Solved Adding Field To Query Using Expression w/ Multiple Values

EzGoingKev

Registered User.
Local time
Today, 07:07
Joined
Nov 8, 2019
Messages
199
I know I can do this - F1 : "Test1" and it will put Test1 in the field.

Is there a way to to something like F1: ("Test1", "Test2") so the query will produce two identical data sets but one will have Test1 and the other will have Test2?
 
will produce two identical data sets

No. A query is a dataset: 1 query=1 dataset.

Perhaps you can better explain the context and the ultimate aim of what you are trying to accomplish. Better sample data will help too. Demonstrate what you hope to end up with.
 
I'm not sure where you are doing this. What part of Access are you using?

To skip ahead while waiting for just a little bit more of an explanation, it is indeed possible to have a query with two values in the criteria. It is possible to have either of two values selected for a query such that the result contains records that contain either one or the other of the values.

However, a single query always and only produces a single data set.
 
Well you could have something where the output result will depend on a condition such as X = True / False.
e.g. F1: IIf(X=True,"Test1", "Test2")

However it is still only one dataset at any time
 

Users who are viewing this thread

Back
Top Bottom