Get field information from current form.

H

hiebert

I'm trying to figure out how to get information from a specific field
in a current form. What I need to do is retrieve this information, then
call an if/else based on it using a command button. Any help would be
greatly appreciated.
 
A

Amit

I'm trying to figure out how to get information from a specific field
in a current form. What I need to do is retrieve this information, then
call an if/else based on it using a command button. Any help would be
greatly appreciated.

Hi,

Try this air code in the OnClick event of the button on the form:
If Me.<control name> = 0 then
Msgbox "Value is 0"
Else
Msgbox "Value is not 0"
End If

You can modify the condition according to your requirement. And, replace
<control name> with the name of the control on the form for the field in
question.

Hope this helps.

-Amit
 
Top