Checking if a form was loaded

jlabre01

Registered User.
Local time
Today, 17:23
Joined
May 26, 2008
Messages
62
Hi,

The problem is this, i have a combo box that as a result of selecting something it opens a form where i select a price by checking a check box. once a check box has been selected i can close the form and finish creating the invoice. however when i change a different combo box first i get a error saying there was an invalid use of null. all I want to do is put an if statement so that when the wrong combo box is selected/modified first a prompt pops up telling the user to start at the proper combo box. any suggestions?

jlabre01
 
I don't think that the problem is checking to see if a form is loaded since you have a specific order that you want the combo boxes clicked in.

In the properties of the combo boxes, you could set the Enabled property to No (with exception of the very first one) so when the form is opened only one combo box can be manipulated.

On the AfterUpdate() event of that combo box I am thinking of something like ...

If Len(Nz(Me!ThisComboBox, "")) = 0 Then
MsgBox "You must put something in this combo box."
Else
Me!TheNextComboBox.Enabled = True
End If

.... to sort of daisy chain the combo boxes.

Just off the cuff.
-dK
 

Users who are viewing this thread

Back
Top Bottom