Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-populate after selecting data from TWO combo boxes

Status
Not open for further replies.

RobioAXP

Technical User
May 7, 2004
3
US
Hi,

I could really use some help. I’ve tried my best to search the existing discussions, but I either couldn’t find exactly what I needed, or I got so confused that I didn’t even recognize the answer (novice Access user here).

Anyway, I am trying to create an edit form that will pull certain text box records based on 2 combo boxes. As with other similar questions I found in the forum, I want my text boxes to auto-populate based on my Combo Box choices. But, so far, the only answers I found pertain to having only 1 combo box narrowing my records. In my case, I have one combo box for Vendor (cboVendor). When I select a particular vendor from cboVendor, it then narrows down my choices in my second combo box called Invoice Date (cboInvoiceDate). I think I have this part already figured out (using After Update code), and it seems to work great.

But, now I want to add text boxes for Invoice Amount and Date Paid (also database fields). By the time I choose a particular Vendor and Invoice Date from my combo boxes, they will narrow down the records to one. So, I want the record’s results to display in my text boxes txtInvoiceAmt and txtDatePaid.

I have a feeling I need to do something with the After Update property, but how do I make the text boxes update only after both the Vendor (cboVendor) is selected and the Invoice Date (cboInvoiceDate) is selected?

I really appreciate any help you can offer. This has me stumped and I’m treading water here. Thanks!
 
Here's one possibility....

Base your form on a query that uses the cboVendor and cboInvoiceDate as criteria. After selecting the invoice date....
Code:
me.requery



Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top