Results 1 to 2 of 2

Thread: Need some help here?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Posts
    22

    Post

    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?

  2. #2
    Junior Member
    Join Date
    Jun 1999
    Location
    St. Louis MO USA
    Posts
    18

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width