If then help in a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, if some one could help please
I have a toggle button that tracks results via 0,1,2. I need to translate this to the english language
I created a text box called [Text8] depending on the value in [WH Checkbox] which can be 0,1,2. I need the text box to show "pending", "full", "partial" depending on the value in [WH Checkbox
i.e
=IIf([WH Checkbox]=0,[Text8]="Pending",[Text8]="Need Info"
doesn't seem to work. I know this should be a simple task

Thank you
VADIMBAR
 
As there are three options, you may wish to consider using
the Switch function instead of IIf. Try this as the
ControlSource for Text8

=Switch([WH Checkbox]=0, "Pending", [WH Checkbox]=1,
"Full", [WH Checkbox]=2, "Partial")

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Hello, if some one could help please.
I have a toggle button that tracks results via 0,1,2. I
need to translate this to the english language.
I created a text box called [Text8] depending on the value
in [WH Checkbox] which can be 0,1,2. I need the text box to
show "pending", "full", "partial" depending on the value in
[WH Checkbox]
i.e.
=IIf([WH Checkbox]=0,[Text8]="Pending",[Text8]="Need Info")
doesn't seem to work. I know this should be a simple task.

Thank you,
VADIMBAR
.
 
I would make use of the After Update event for [WH Checkbox];

Private Sub WH_Checkbox_AfterUpdate()

Select Case
Case 0
[Text8]="Pending"
Case 1
[Text8]="Full"
Case Else
[Text8]="Partial"
End Select

End Sub

HTH
Mich

VADIMBAR said:
Hello, if some one could help please.
I have a toggle button that tracks results via 0,1,2. I need to translate this to the english language.
I created a text box called [Text8] depending on the value in [WH
Checkbox] which can be 0,1,2. I need the text box to show "pending", "full",
"partial" depending on the value in [WH Checkbox]
i.e.
=IIf([WH Checkbox]=0,[Text8]="Pending",[Text8]="Need Info")
doesn't seem to work. I know this should be a simple task.

Thank you,
VADIMBAR
 
Back
Top