Results 1 to 3 of 3
  1. #1
    DBaker7777 is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    14

    Angry Combo Box Issue

    I have a combo box (cbo1) that has values from another table. I then have a textbox that has a dlookup expression that looks up the value in the combobox (cbo1). That part works fine until I select another combobox or checkbox the result from the dlookup of the textbox changes to #Value! every single time. It will not hold the dlookup result. (cbo1) still has what the user selected, but like I said the textbox dlookup goes to #Value! What am I missing here?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    I then have a textbox that has a dlookup expression that looks up the value in the combobox (cbo1).....
    Instead of using DLookup() it would be better to include the required data in a hidden column of the combobox. Then reference that column from the textbox by setting the Record Source property of the textbox with something like:
    =NameOfCombo.Column(2)

    The number in brackets is the column to be returned. The column count is zero based so the first column would be (0), the second would be (1) etc.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Why would you want the same value in 2 different controls on the same form anyway?
    For me, question 2 is less important - why not just make textbox equal combo value or a column value rather than DLookup on a combo? Or is the word "lookup" in that case not the DLookup function?
    BTW, if you can DLookup on a combo, that's news to me.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. combo box issue
    By DMT Dave in forum Access
    Replies: 2
    Last Post: 06-10-2020, 09:02 AM
  2. Replies: 1
    Last Post: 09-16-2013, 02:37 PM
  3. Combo Box Issue
    By brandonze in forum Forms
    Replies: 4
    Last Post: 08-02-2011, 09:31 AM
  4. Combo Box Issue
    By gl2295164 in forum Access
    Replies: 2
    Last Post: 08-01-2011, 09:27 AM
  5. Combo box Issue
    By desireemm1 in forum Access
    Replies: 2
    Last Post: 09-06-2009, 03:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums