dual recordsource for form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the proper way to change the recordsource of a form when it is open
from two different sources?

Right now, I am passing openargs to the form's load event
but I think that's probably too late.

the calling form command goes something like this:
docmd.OpenForm "frmComplaints",,,strSQL,,,,"Unresolved"

vs

docmd.OpenForm "frmComplaints",,,,,,,,"Normal"

Definitely, if I reopen the form in the load event, I have no way of knowing
what a variable strSQL filter will be.

The only example I have of changing the recordsource was from a KeyDown
event where the source was changed while currently IN a form.
since it worked, I didn't stop to consider if there was a more proper way of
doing it - for -say - if you had to open the form from another source.
 
jonefer said:
What is the proper way to change the recordsource of a form when it is open
from two different sources?

Right now, I am passing openargs to the form's load event
but I think that's probably too late.

Use the Open event. It's one step before Load.
 
Back
Top