Record Source Conditional Branching -

  • Thread starter Thread starter Jasmine
  • Start date Start date
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.
 
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
 
Outstanding.

This Newsgroup is certainly the best ever.

I appreciate this.

Thanks Steve.

-----------------------------------------------
 
Back
Top