Test Statement

twosides

Registered User.
Local time
Yesterday, 18:29
Joined
Jul 19, 2005
Messages
38
Hi Folks,
I would like to know if there is a way of testing for values using an IF statment.
I know there is but my knowledge of IF statments does not extend to this senario.
So what I want to do is basically test for the following:

OrderPlaced = -1 AND
FromStock = 0 AND
Arrived = -1 AND
InTable = 0

These are all fields in the "Car" table.

I want to use the condition to enable a button on a from if the above is true, but to hide it if not, this part I can do but only for a single criteria at the moment.

Any help at all will be most useful, as usual,
Cheers
 
if those 4 are fields in the table or query your form is based on the it should work if you just put what you've written into an if; as long as you put the name of each field in square brackets []. so...

if [OrderPlaced] = -1 and ... then
 
twosides,

Use your form's OnCurrent Event:

Code:
If Me.OrderPlaced AND Not FromStock AND Arrived AND Not InTable Then
   Me.YourCommandButton.Enabled = True
Else
   Me.YourCommandButton.Enabled = False
End If

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom