=> Frame Option value 1 or 2 represented as Text

R

Rhonda Fischer

Hello,

I have a 'search form' with two option buttons selected
by the User. My filter query refers to these values
as frameOptIncident collecting either the value of 1 or 2
to open a report form.
I would like for the report form to display text.

I have tried the following code on the before update
of the text box and on it's form load without any success.

If frameOptIncident = 1 Then
txtIncident = "Accident"
Else
txtIncident = "Dangerous Occurance"
End If

I tried the following code with some success
on the form load of the report form, the
txtIncident.Value held the value of 2 when tracing
through the code and then came up with the errmsg:
'Value Entered isn't valid for this field'

If txtIncident.Value = 1 Then
txtIncident = "Acc"
Else
txtIncident = "Dang" <== error here
End If

Any suggestiions would be terrific and much appreciated.

Thank you very much
Rhonda
 

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