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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames and check if it is selected

Status
Not open for further replies.

esengul

Instructor
Dec 9, 2004
59
US
I have a form that has 5 frames with option boxes. before updating my table, i want to see if they select all frames or not. if they didn't, i want to show a warning msgbox with the frame name that they didn't select.
Thanks in advance
 
esengul
You could put code on the BeforeUpdate event for the form.

Code:
If IsNull([Frame1]) Or IsNull([Frame2]) Or IsNull([Frame3]) Or IsNull([Frame4]) Or IsNull([Frame5]) Then
MsgBox "Oops"
Cancel = True
Exit Sub
End If

Of course, change the names to your own frames, and the message to whatever you want it to be.

Or if you are updating from a Command button, include that at the start of your code.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top