PDA

Click to See Complete Forum and Search --> : Need some help here?


Playmaker
Jan 20th, 2000, 12:33 AM
I have a table that has a field called 'CODE' which is a 8 digit number. In another table, I have a text field that is the description for the code field (it also has a 'CODE' field).
I have a datacombo box that is populated with the 'CODE' field numbers. What I want is this: When you click the datacombo and scroll down to the code you want, after you select it, I want, on a label next to it, display the appropriate description from the other table. Can anybody give me some advice?

raicheman
Jan 20th, 2000, 02:07 AM
You could try something like the following -

Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

Let Data1.RecordSource = "SELECT DESCRIPTION FROM DESCRIPTIONDATA WHERE CODE = CODEDATA.RECORDSET(0)
Data1.Refresh

'or this

With Data1.Recordset
.FindFirst "CODE = '" & CODEDATA.RECORDSET(0)
End With

End Sub