Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2014

    Unanswered: DLookup and combobox first item

    Hi to every one

    I have an issue with Dlookup function and combobox; I made an <on current> event to be able to fill up three separate textboxes details from another query. The DLookup function is triggered from a combobox. Once the form is loaded it works as expected the first record is displayed with all relevant information filled correctly. Once the user chooses another item from the combobox again it works perfectly and so on for each item in the combobox list with the exception of the first item in the list! When the first item is selected back it autofills the textboxes related to the query it retrieves data, but the separate textboxes that are filled by means of the <on current> event via Dlookup function don’t change, they remain showing data from the last combobox choice before choosing the first Item.

    Thanks for your help

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    are you using bound controls? ie are the combo / list boxes presentign the (decoded) values of foreign keys for each and every row or just the current value of that list box/combo box. hgave yiou expressly bound a data column as part of the controls data definition.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2014

    Thanks for your reply, I have a form based on a query which includes StaffID, LastName, FirstName and Grade. Two subforms complete the form with StaffID linking Master and child, I have replaced the StaffID textbox with a combobox to facilitate user interface. In the end I've added three textboxes to display additional data from another table, only this time I've set an on current event employing Dlookup to fill these textBoxes. The only thing I've done is to set the combobox default value to the first record from the original Query i.e. StaffID since on load the form would display the LastName FirstName and Grade but not the StaffId from the combobox until this is selected.
    I've tried to insert back the staffID textbox hiding it but using it in the where clause of the Dlookup but no luck

    I hope to find a solution cos this is driving me nut.

    thanks once more

Posting Permissions

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