Form Control searches records in Table for a value

  • Thread starter carlarae via AccessMonster.com
  • Start date
C

carlarae via AccessMonster.com

I have a trouble call ticket form and before the user can send it to close
with a combo box selection I want the Trouble Ticket number searched in the
Assigned Techs Table to make sure all Completed are marked "Yes" if not then
it will exit the sub and inform (msgbox) the user that they cannot close
until "assigned user name" (could be more than one) is completed. I've
listed the two tables I have and the fields that are needed for this action
just do not know where to begin on coding it.

I'm assuming on the BeforeUpdate of my combobox that sends the ticket to
close but how do I have it search the table for Completed value and return
the message if it isn't complete?

I have two Tables:
T_TroubleCalls (TroubleID)
T_AssignedUsers (AssignID, TroubleID, AssignedUserName,Completed)
 
J

Jason

By setting the field's in the table as required access will automatically do
this for you.
 
C

carlarae via AccessMonster.com

Jason said:
By setting the field's in the table as required access will automatically do
this for you.
I have a trouble call ticket form and before the user can send it to close
with a combo box selection I want the Trouble Ticket number searched in the
[quoted text clipped - 11 lines]
T_TroubleCalls (TroubleID)
T_AssignedUsers (AssignID, TroubleID, AssignedUserName,Completed)

I understand the required setting in the table, however, in T_Assigned Users
the Completed column is N/A, No, Yes, Returned, I need it to check to make
sure all Assigned Users on the ticket are a Yes upon the action of changing
the combo box from "Pending" to "Completed" if I set the table field to
required it will already see there is a value there wouldn't it? I need it
to look for a certain value (on the before update event (I think) of the
combo box that the user selects the completed action from....... and loop
through all assigned users that have the same Trouble ID number then return a
yes (proceed with action) or a no (msgbox, User "abc" is not complete).
 

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