Parameter Query with Parameter in If Statement

Parameter Query with Parameter in If Statement

Post by Randa » Sat, 17 Jul 2004 01:11:27


Is there a way to put an unknown parameter in an If statement, but only have
the query ask for the parameter when the criteria is met. Example:

Field3: IIf([Table1]![Flag]="Yes",[Table1]![Name],[enter your own name])

This asks me for the parameter even if the flag is set to "Yes" and I only
want it to ask when flag is not = "Yes"
 
 
 

Parameter Query with Parameter in If Statement

Post by Frank Ston » Sat, 17 Jul 2004 04:51:05

I'm not sure but it sounds like you've confused the issue.
access ran into a record that was not yes and is asking
for input. problem is you don't know which record it is
asking input for. I don't think I would try this method.
"enter your own name" sounds like someone other than you
is doing the input which cofuses me. If you are doing the
input, i would just write a select query where field3
<> "yes".
statement, but only have
met. Example:
your own name])
to "Yes" and I only

 
 
 

Parameter Query with Parameter in If Statement

Post by Randa » Sat, 17 Jul 2004 05:39:09

This particular table will always only have one record. It is a made table
that is created by either grouping a bunch of records where I want the user
to assign a name --- or a single record where I can use the actual name.
But I agree with you that this was probably not the best approach. I would
up using a condition on a macro.