Buttons with conditions

N

Nick

I want to set up a series of forms that can only be
opened once the previous form has been filled in e.g.
form number 1 has 2 fields in it, one of these fields
needs to be filled in before the user can progress to the
next form by pressing a button.

Regards

Nick
 
G

Gerald Stanley

In the button's click eventhandler, you need to put in code
along the lines of
If Len(txtBox1) = 0 and Len(txtBox2) = 0 then
MsgBox "Please Enter Some Data"
Else
DoCmd.OpenForm "form2"
End if

You need to change txtBox1, txtBox2 and form2 to suit your app.

Hope This Helps
Gerald Stanley MCSD
 

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