M
Mark
Hi,
Would something like "dlookup" work for the following????
I need some assistance with part of my class registration
form. I have a class registration form, in which
employees can enroll in various classes. Upon filling out
a few fields in the form the user can click a command
button that will save the record in a table. I have an
if statement in the event procedure of the command
control/button that prompts the user of a few things,
such as if certain fields are not filled out, before being
able to save the record/class enrollment. I would also
like to "not" allow an employee to register for a class
more than once. If an employee has registered for a class
can I just add something in the "if" statement of the
click command procedure to check if the "ClassID"
and "EmployeeID" are found in the "Class Registration
Table"... thus not allowing duplicate enrollments? As in
something like below:
ElseIf (Me.ClassID) = (Tables!
tableClassRegistration.ClassID) And (Me.EmployeeID) =
Tables!tableClassRegistration.EmployeeID) Then
MsgBox "You have already registered for this class, please
choose another class to enroll in or exit this form."
Me.ClassID.SetFocus
I would probably need to use both of the identifiers to
accomplish this.
Thanks for helping me out with this!!!!!!!!.
Would something like "dlookup" work for the following????
I need some assistance with part of my class registration
form. I have a class registration form, in which
employees can enroll in various classes. Upon filling out
a few fields in the form the user can click a command
button that will save the record in a table. I have an
if statement in the event procedure of the command
control/button that prompts the user of a few things,
such as if certain fields are not filled out, before being
able to save the record/class enrollment. I would also
like to "not" allow an employee to register for a class
more than once. If an employee has registered for a class
can I just add something in the "if" statement of the
click command procedure to check if the "ClassID"
and "EmployeeID" are found in the "Class Registration
Table"... thus not allowing duplicate enrollments? As in
something like below:
ElseIf (Me.ClassID) = (Tables!
tableClassRegistration.ClassID) And (Me.EmployeeID) =
Tables!tableClassRegistration.EmployeeID) Then
MsgBox "You have already registered for this class, please
choose another class to enroll in or exit this form."
Me.ClassID.SetFocus
I would probably need to use both of the identifiers to
accomplish this.
Thanks for helping me out with this!!!!!!!!.