Results 1 to 2 of 2

Thread: ADO & linked Datacombo probems

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    70

    Question

    I have a Datacombo which is filled with items from a ADO data source/connection/ SQL command.

    I what to have a text box which displays a corresponding field. ie ... from the same record from which the item selected in the text box originates.

    I want to text in the text box to change to corresponding field value when the user selects a different item from the datacombo box.

    Any help would be greatful... Have a feeling a need a data control but am unsure how datacombo and text box should be connected to this

    Cheers

    Jonny

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Code:
    Private Sub DataCombo1_Click(Area as integer)
    'Makes sure the click is in the dropdown box and there is something selected   
    If Area=2 And DataCombo1.text<>"" then 
       'Assuming the name of the ADO object is ADO and the field used to Identify a record is UsrName
          ADO.Filter="UsrName='" & DataCombo1.text & "'"
          'This filters through the recordset and pulls out any records that match the criteria in the filter
          'This will work for search for a string if it is a number thenuse something like this instead
          ADO.Filter="UsrID=" & CInt(DataCombo1.text)
    End if
    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