select case two conditions

D

deb

access 2003

Getting type mismatch on a select case - Case "ST" And Nz([ckGEN] = -1)
doesn't like Nz([ckGEN] = -1) which is a check box on form

Select Case txtUnitType.Value

Case "CT"
Me.f018ContrPerfEmissGuaDetails.Form.optHPorIPorLP.Visible = False
Me.f018ContrPerfEmissGuaDetails.Form.FrameElem_Label.Visible = False


Case "ST" And Nz([ckGEN] = -1)
Me.f018ContrPerfEmissGuaDetails.Form.optHPorIPorLP.Visible = False
Me.f018ContrPerfEmissGuaDetails.Form.optHPorIPorLP.Value = Null
end select
 
J

Jeff Boyce

Deb

You've told us "how" you are trying to do something, but not much about
"what".

It appears you are trying to compare the value of txtUnitType to "ST" And
True (or "ST" And False).

"ST" doesn't seem like a boolean value...

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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

Top