Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error handling for form 1

Status
Not open for further replies.

newbieone

Technical User
Jan 3, 2006
50
US
I need to make sure that a name is selected from a list before a form will open. The enduser will pick from a list on the Main form then click on another button to enter the rest of the data in a different form. how do I make sure the user selects from the list?
 
Check that there's something selected in the listbox in the code opening the next form.

Roy-Vidar
 
Use this on every button:

Code:
If Nz(cboComboBox, "") = "" Then
    MsgBox "Please select a name to work with first.", vbOKOnly, "Select Person's Name"
    Exit Sub
End If

...rest of code here will run as long as above is not true...

Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top