Noreene Patrick
Registered User.
- Local time
- Yesterday, 21:13
- Joined
- Jul 18, 2002
- Messages
- 223
My form has a command button that employees can click to get current efficiency....The command button runs a query and opens a form that shows their name and efficiency with a command button to go back to original form. However, if they put in the wrong id # or hit a + sign or something foreign, it cannot query because the id number is incorrect so it gives them the form without anything on it...it doesnt even have the button to go back to original form...they cant get back.
So, right now the code behind the on click event of the button says:
Private Sub cmdcheckminutes_Click()
DoCmd.OpenForm "frmindividualorderminutes"
end sub
How do I tell it to cancel the command if the id number is incorrect ? (I dont want it to even open the form.)
Also, when the "individualorderminutes" form closes to go back to original form, I want the focus set on me.pickerid field...I couldnt figure out how to reference that field from another form..
Thanks, Noreene
So, right now the code behind the on click event of the button says:
Private Sub cmdcheckminutes_Click()
DoCmd.OpenForm "frmindividualorderminutes"
end sub
How do I tell it to cancel the command if the id number is incorrect ? (I dont want it to even open the form.)
Also, when the "individualorderminutes" form closes to go back to original form, I want the focus set on me.pickerid field...I couldnt figure out how to reference that field from another form..
Thanks, Noreene