Home > Microsoft Access Help > Convert Input box string to "Yes/No" Value in a Query

Convert Input box string to "Yes/No" Value in a Query



I'm trying to create an update query that prompts the user to enter the "Update to" value. The field I am trying to update is a "Yes/No" check box field. When using the following code it because I don't have quotes around the default value "Yes" it inserts "-1" so it works, however the users of the database don't/won't know that "-1" is a yes value and "0" is a no value, so I'd prefer that they could type in text as "yes" or "no" instead:



Eval("InputBox(""Do you want to Complete Update Check Box?"",""Updates Completed?"",Yes,4000,2000)")



Is there a way to convert the "Yes" entered into the Input Box by the user to a "-1" or "0" value behind the scenes so that it will update the field in my table?

    
Guest


You can't use the parameter query method to do that. You will have to do something like create a small form for the user to choose Yes or No from radio buttons, then click on "Go" or something, so you can control what criterion is used in the query.

Was this answer helpful ? Yes No   
Guest


Thanks for your help!

Quote:
Originally Posted by don94403
You can't use the parameter query method to do that. You will have to do something like create a small form for the user to choose Yes or No from radio buttons, then click on "Go" or something, so you can control what criterion is used in the query.

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved