Results 1 to 2 of 2

Thread: Stuck....Please Help, New to Adodc

  1. #1

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    If i have a text box linked to an adodc control, where the text box displays the invoice #. And i also have a list box, which also displays all of the invoices, both bound to the adodc. when an invoice # is displayed in the text box, the number is highlighted in the list box, but when i selected a number in the list box, is doesn't bring up the number in the text box?? How can i get the text box and the list box to correspond to each other. thanks

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Hey i read your post and i just slapped a command button
    a combobox and a textbox on a form and tried to figure out
    your problem real quick before i go out. It's friday night you know! {{{Laughing}}}

    Option Explicit
    Dim db As Database
    Dim rs As Recordset

    Private Sub Combo1_Click()
    Text1.Text = Combo1.Text
    End Sub

    Private Sub Command1_Click()
    Dim i As Integer
    rs.MoveFirst
    For i = 1 To rs.RecordCount
    If rs!AccountID = Text1.Text Then
    Combo1.Text = Text1.Text
    End If
    rs.MoveNext
    Next i
    End Sub

    Private Sub Form_Load()
    Dim i As Integer
    Set db = OpenDatabase("C:\SoilTicketPrintingProgram\SoilTicketdb\SoilTicketdb.mdb")
    Set rs = db.OpenRecordset("Account Information")
    For i = 1 To rs.RecordCount
    Combo1.AddItem rs!AccountID
    rs.MoveNext
    Next i
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    rs.Close
    db.Close
    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