What is wrong with this if statement

Mrs.Meeker

Registered User.
Local time
Today, 08:56
Joined
Mar 28, 2003
Messages
172
If[tbluser]![survey_type] = "QA" then [tblQuestions]![UserType] = "b" else ("b" or "d")

Do you see something wrong with this? I received an error message that said I had invalid syntax - maybe an operand without an operator...it was highlighting the word 'then'.

What I'm trying to accomplish is build a form which selects the survey type either "b" or both "b & d".

This is in an append query.

"d" is questions for a specific group (design)
"b" is questions for both groups (design and field)

There is also the following criteria under the 'QuestionTypeHeading':
[Forms]![frmDataSelection]![txtPackageTypeValue] Or
[Forms]![frmDataSelection]![txtProjectTypeValue] Or
[Forms]![frmDataSelection]![txtAbutmentTypeValue] Or
[Forms]![frmDataSelection]![txtPierTypeValue] Or
[Forms]![frmDataSelection]![txtSuperstrTypeValue]

The DataSelection form contains option buttons for various types of questions. These questions are chosen from the table according to what selections are made. Then those questions need to be different according to the user type.

I tried placing the criteria is 2 other update queries (named qryGenerateQA, qryGenerateQC and then the qryBuildSurvey) This didn't work.

So I'm trying this if statement that I obviously can't write correctly.

Thanks for your help!
rhonda
 
Not sure but how about an End If at the end of the If

Len B
 
Gee that makes a lot of sense! duh, guess I could have stared at that for hours!

Unfortunately I don't think it's going to work. I think I need to write 2 different queries to build the surveys. One for each survey_type.

Thanks!
Rhonda
 
My approach to this type of situation is to get one version working and then try adapting to suite variable situation.

Going from something that works at least starts you at a point where syntax etc is okay

Len
 
My thoughts exactly. The build query works but only on one side. First I thought I'd try the if statement but now I think another query would be better. I'll try to let you know how it goes.
 

Users who are viewing this thread

Back
Top Bottom