Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    milton keynes, Buckinghamshire
    Posts
    252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Binding a text box to a combo box (2003)

    I have a single table with 2 fields: barcode and comment

    Onto a form I dropped a combo box which displays all the unique barcodes in the barcodes field.

    Onto the form I then dropped a text box, in which I wish to display the comment relating to the barcode. Can somebody please advise how to bind the text box to the combo box so as to allow me to display and update the comments associated with any barcode. I have tried queries and all sorts of expressions without success.

    (I also need the facility to be able to add barcodes if this makes a difference)

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding a text box to a combo box (2003)

    Here a quick and dirty sample of what you want.
    This code use DAO, so you should set a reference to Microsoft DAO xx Object Library.
    Francois

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    milton keynes, Buckinghamshire
    Posts
    252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding a text box to a combo box (2003)

    Francois

    How exactly do I set a reference to Microsoft DAO xx Object Library.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Binding a text box to a combo box (2003)

    Activate the Visual Basic Editor (Alt+F11)
    Select Tools | References...
    Locate "Microsoft DAO 3.6 Object Library".
    Tick the check box, if it isn't already (I believe that it is set by default in Access 2003)
    Click OK.

Posting Permissions

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