J
Joy
Hi,
Hope I can get some help from you as I'm new to MS Access coding. On my form
I have created an email button. The email button only works if certain
conditions are met ie. mandatory fields must be completed before you can
email the form.
However there is 1 mandatory field that may or may not be completed based on
a condition ie. If ComboBox2 (mandatory field) shows value of Director or
Deputy Director then ComboBox3 (mandatory field) need not be completed. But
if ComboxBox2 does not show a value of Director or Deputy Director then
ComboBox3 must be filled-in.
At the moment for all other conditions to be met, the code is:-
If IsNull(ComboSpec2) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboSpec2"
Else
If IsNull(ComboPriCentre) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboPriCentre"
Else
If IsNull(ComboPriDept) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboPriDept"
Else
DoCmd.SendObject acSendForm, "NewProfReqForm", acFormatXLS, "Joy Thong", , ,
"New Prof Request", "Hi Could you pls enter this prof into Orion. Thanks!!!",
False
My problem is I am not sure how to code the requirements as stated above to
ensure the condition is met. Pls help...
Thanks Joy
Hope I can get some help from you as I'm new to MS Access coding. On my form
I have created an email button. The email button only works if certain
conditions are met ie. mandatory fields must be completed before you can
email the form.
However there is 1 mandatory field that may or may not be completed based on
a condition ie. If ComboBox2 (mandatory field) shows value of Director or
Deputy Director then ComboBox3 (mandatory field) need not be completed. But
if ComboxBox2 does not show a value of Director or Deputy Director then
ComboBox3 must be filled-in.
At the moment for all other conditions to be met, the code is:-
If IsNull(ComboSpec2) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboSpec2"
Else
If IsNull(ComboPriCentre) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboPriCentre"
Else
If IsNull(ComboPriDept) Then
MsgBox "Incomplete Form"
DoCmd.GoToControl "ComboPriDept"
Else
DoCmd.SendObject acSendForm, "NewProfReqForm", acFormatXLS, "Joy Thong", , ,
"New Prof Request", "Hi Could you pls enter this prof into Orion. Thanks!!!",
False
My problem is I am not sure how to code the requirements as stated above to
ensure the condition is met. Pls help...
Thanks Joy