select case two conditions



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

Jeff Boyce


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

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...


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

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