Search a second table from a form

G

Guest

Using Access 2003 Window XP Professional

I have a form where the I enter a variable called JOBNAME and one called
REQUESTOR which updates the table (MASTER_TABLE)

I Have a second Table (tblUserTable) with two fields with the same two
names. It lists each JOBNAME and the authorized REQUESTORS.

I need a way to verify the Requestor is authorized for the JOBNAME and
enter the text "USER NOT AUTHORIZED" in the field COMMENTS on the
MASTER_TABLE only
if the User is not authorized.

Any Help is Appreciated!
 
G

Guest

In order to accomplish your requirement - - the fundamental logical
relationship between JOBS and REQUESTORs must pre-exist in the Database.
Otherwise it won't know when "USER NOT AUTHORIZED" would be correct.

And therefore the approach one might wish to take is to offer the JOBs as a
ListBox/ComboBox i.e. dropdown - that one selects from.

And upon selection - the REQUESTORS would be also a combobox/listbox which
is only offering those REQUESTORS that are applicable.

(There is a query or filter in the background that occurs when the JOB is
selected - so that only authorized REQUESTORS info is available to the
combobox/listbox)

This approach doesn't crank out the "USER NOT AUTHORIZED" message as you
first requested - but is also avoids people mis-spelling / mis-typing names -
they simply select from the authorized list.

Hope this helps....
 
G

Guest

Thanks for the info. That was the first thing I tried but management didn't
like it.
I resolved it by writing VBA code in the On Exit property for the REQUESTOR
field.
It is supposed to be a temporary thing...But then so was withholding for
taxes.

Again, thanks for you responsed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top