PDA

View Full Version : Dlookup and vba code request



IIBRAHIM
11-14-2022, 10:17 AM
I have a table named frmNew with 3 fields; CustomerNo, Except and Status.
The status can either be open or closed.


I have a form named, frmNew with 3 text boxes of txtCusNo, Except.


I want a vba code (preferrably, with Dlookup) that will look up the CustomerNo on the table anytime a customer number is specified in the txtCusNo and if the status is open, it should show a messagebox of "I like this".

June7
11-14-2022, 08:45 PM
Why would you need DLookup if form is bound to table? Is this form used for data entry of customers?

If you want to provide db for analysis, follow instructions at bottom of my post.

Gasman
11-18-2022, 08:06 AM
I am sure this is a crosspost, but unable to find the other post in whatever forum I saw it previously.
I am sure I responded to that post as well.:(

Found it! https://www.access-programmers.co.uk/forums/threads/dlookup.325593/