Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with conditional statement 1

Status
Not open for further replies.

villsthearcher

Technical User
Oct 20, 2005
27
US
Hello,

I am using a FORM to pass values to the Query which is used by a Report. To force the user to enter a parameter value, I added a conditional statement for a textbox in the FORM.

Code:
if Nz(textbox1)=0 then goto XYZ 

XYZ: 
Msgbox "Enter a value"

Now this works fine, but there is a scenario when one of the values entered is "0000". The usual values entered in the textbox is alphanumeric like AB1C, 1234 etc. So could anyone tell me, how do I covert this numeric value into a String or alphanumeric datatype, that results in
Nz(0000)!= 0.


Thanks,
villsthearcher
 
And what about this ?
If Trim(textbox1 & "") = "" Then GoTo XYZ

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top