Record Source Conditional Branching -

J

Jasmine

Is it possible to do a conditional branching within a record source using a
query as the source.
I have 2 queries -

1 without any condition ( query1)
1 with a filter on selected records ( query2).

I was typing the following in the Record Source-
iif(var=0,query,query2)

This obviously generated an error - don't know if i have the syntax wrong
or - just grasping for straws.
 
S

Steve Schapel

Jasmine,

You could use code like this, perhaps on the Open event of the form:

If var Thern
Me.RecordSource = "Query2"
Else
Me.RecordSource = "Query1"
End If
 
J

Jasmine

Outstanding.

This Newsgroup is certainly the best ever.

I appreciate this.

Thanks Steve.

-----------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top