Full Version: Switch Function Ms Access 2007
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
liro0917
I am trying to create switch that will give 1 point to an answer field in my database. I created one on the first question and it works fine. Now Im trying to create another one in Expression Builder for my next question here is what I am doing:

CountSHCompOth:Switch([SelfCompareHealthOthers]=Poor, "1") but when I run it the Enter Parameter Value box pops up with Poor in the title of the pop up box. I don't want this so not sure why this is happening and I notice that when I go back in to build to check the code access has put brackets around my word Poor ex [Poor]. How can I fix this??

Thanks! Liro
Jeff B.
welcome2UA.gif

"How" will depend on "what", and I don't have any idea what your data looks like. Table structure and relationships need to happen first.

More info, please...
liro0917
Ok never mind I put single quotes around my word 'Poor' and that took care of the problem!
Jeff B.
Thanks for posting your solution. Someone else will be looking for an answer some day and find YOURS!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.