A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If then help in a Form



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2004, 07:16 PM
VADIMBAR
external usenet poster
 
Posts: n/a
Default If then help in a Form

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
  #2  
Old June 2nd, 2004, 07:31 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default If then help in a Form

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
.

  #3  
Old June 2nd, 2004, 07:37 PM
M Skabialka
external usenet poster
 
Posts: n/a
Default If then help in a Form

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" wrote in 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



  #4  
Old June 3rd, 2004, 04:46 PM
VADIMBAR
external usenet poster
 
Posts: n/a
Default If then help in a Form

Thank you both. It worked!
  #5  
Old June 7th, 2004, 07:56 PM
VADIMBAR
external usenet poster
 
Posts: n/a
Default If then help in a Form

That didn't work. :-(
  #6  
Old June 7th, 2004, 07:56 PM
VADIMBAR
external usenet poster
 
Posts: n/a
Default If then help in a Form

Gerald this method worked great. However, I found that I can not select that text box to SORT my records.Hmmm Any ideas? Fields are not locked I checked just in case.
Thank you,
VadimBAR
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.