Formulas

G

Guest

Hi,
I want to create a formula that will check field A and if Field A is = to 0,
I want move to the next record and process the formula all over. If Field A
is > 0 I want to display a msgbox informing the user the value entered in the
box is incorrect.

I imagine the formula to look something like this:

IFF([FieldA] = 0, move to next record, msgbox("Input Error"))

Any help will be greatly appreciated. Thanks in advance.
 
J

James

Hi,
I want to create a formula that will check field A and if Field A is = to 0,
I want move to the next record and process the formula all over. If Field A
is > 0 I want to display a msgbox informing the user the value entered in the
box is incorrect.

I imagine the formula to look something like this:

IFF([FieldA] = 0, move to next record, msgbox("Input Error"))

Any help will be greatly appreciated. Thanks in advance.

You can use the following code in an after_update event of your form:

If Me!fielda = 0 Then
DoCmd.GoToRecord acActiveDataObject, , acNext
Else
MsgBox "Input Error"
End If

James
 

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

Similar Threads


Top