an if statement in ms access?

A|ex

Registered User.
Local time
Today, 13:37
Joined
Jul 11, 2004
Messages
90
Hi i was wondering if anyone can help me, i am wondering how to disable the box number with a given amount of $

For example:

If i had $31,000 stored in a text field how would i display this amount is in box "3" and show 3 in a text field? if i was programming i would check if the textbox is == $31,000 which is box 3 and display box 3. How do i do this in access?

Box 1 - $12,000
Box 2 - $27,000
Box 3 - $31,000
Box 4 - $42,000
Box 5 - $56,000
 
psuedo code:

Select case textbox1
case "31000"
me.text3.visible=true
case "41000"
me.text4.visible=true
end select

etc...
???
 
the problem i am having at the moment is doing this in a form, is this the psuedo code for VBA? if so i am having a couple of problems

one is obtaining the text from the text field whatever = tboNetSurveyWO2.Text i dont think will work because text from textfields are string. So i wuld have to do Dim whatever as String. Then somehow parse it to and int then use the case statement to compare?
 

Users who are viewing this thread

Back
Top Bottom