By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Complex Query

P: 1
Hi,

I am trying to create a query where, depending on the value returned from the form, a certain column from within the query is called.

Application Test: IIf([Forms]![Dynamic Testing Form]![TextCategory]="Genius","Category1","Category2"

This is the code I thought would work, where Application Test is the name of the new column, TextCategory is the value returned from the form, and Category1 and Category2 are the columns I want to carry out depending on the result.

Within Category 1 and 2 there are 2 different criteria I want met, which is why I want one OR the other.

I'm not even sure if this is possible, and I know my explaination isn't the best, but any feedback would be greatly appreciated
Sep 12 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi,

I am trying to create a query where, depending on the value returned from the form, a certain column from within the query is called.

Application Test: IIf([Forms]![Dynamic Testing Form]![TextCategory]="Genius","Category1","Category2"

This is the code I thought would work, where Application Test is the name of the new column, TextCategory is the value returned from the form, and Category1 and Category2 are the columns I want to carry out depending on the result.

Within Category 1 and 2 there are 2 different criteria I want met, which is why I want one OR the other.

I'm not even sure if this is possible, and I know my explaination isn't the best, but any feedback would be greatly appreciated
The following should work:

Application Test: IIf([Forms]![Dynamic Testing Form]![TextCategory]="Genius",[Category1],[Category2])
Sep 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.