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

AP1Check.VALUE = -1 returns Type Mismatch

Status
Not open for further replies.

dmon000

Technical User
Sep 9, 2003
79
US
Why does this "AP1Check.VALUE = -1" return a "type mismatch" error?

It is part of an If statement. How do you test for the values of checkboxes?
I've tried "on" and "yes" and "true" and get a variable undefined error.

Thanks!!
 
I don't know why you're getting the error, but you don't even need the =, you can just use
Code:
If AP1Check.Value Then...
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
What about this ?
If Me!AP1Check.Value = True Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
With Access bound controls, there's always the possibility of it being Null, therefore:
Code:
If Nz(AP1Check.Value,False) = True Then


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top