Validating logon data from Another Table...

TGHockett

Registered User.
Local time
Today, 13:18
Joined
Aug 16, 2000
Messages
65
Hi again folks ...

I am trying to figure out how to check from a popup form if the user has entered a valid combination of their department's code (RC# aka responsibility center #), and the Dealer#, the two of which combined are used to grab the right pricing data for the department submitting the merchandise proposal later on).

The logon form is based on a masterlogon table to collect the initial information, and the 'unique' RC#/Dealer# combinations (one to many relationship) are stored in a separate table that is linked to the active / proposal tracking DB from the very large (400 mg) pricing DB.

Since a preliminary form asks for the user name and RC# aka dept.#, I initially thought I could use Dlookup() function on the After Update event in the Dealer# control to see if its a valid combination, i.e., if the RC# has associated data stored in the pricing table for that Dealer#.

Then I tried creating a separate Select/sub query based on the two values shown on the Popup form, and running the query from the After Update event (with a conditional IsNull([ValidateQuery]) macro, but still no luck.

The query runs ok from the macro, but A2K says there is a problem ala "you tried running a VBA procedure etc ... not permitted for Automated operations" or somesuch....

Any thoughts?

TGH
 
I have come up with a work around solution using a combo box that lets the user visually see if the dealer# entry has a corresponding 'match' with a their RC#/dept code, but would still be interested in any ideas to 'bullet proof' this piece of the db.

TGH
 

Users who are viewing this thread

Back
Top Bottom