TheWedgie
Registered User.
- Local time
- Tomorrow, 08:22
- Joined
- Mar 15, 2009
- Messages
- 19
Howdy all - is it possible to create a query with a dynamic RecordSource that can be changed on load?
Basically I've taken over an event medical centre management DB from a retard, and it currently creates a new table for each event - so all my reports/forms that I've added to make it work have had to had some funky RecordSource selection stuff added - ie the data entry screen is actually a main form with a dropdown listing all the tables, then a subform whose recordsource changes based on the dropdown.
I can do the same with Reports - use their OnLoad event to set RecordSource based on a dropdown on a form...
However, I can't seem to do the same with Queries... is it even possible?
(I need to create a Report with a heap of Count fields to count x number of patients etc, and the only way I know is with a Query)
I can't change the DB setup, it's too much work currently - a new version is in the works but I need to get a couple of features added to the current one in the meantime.
Basically I've taken over an event medical centre management DB from a retard, and it currently creates a new table for each event - so all my reports/forms that I've added to make it work have had to had some funky RecordSource selection stuff added - ie the data entry screen is actually a main form with a dropdown listing all the tables, then a subform whose recordsource changes based on the dropdown.
I can do the same with Reports - use their OnLoad event to set RecordSource based on a dropdown on a form...
However, I can't seem to do the same with Queries... is it even possible?
(I need to create a Report with a heap of Count fields to count x number of patients etc, and the only way I know is with a Query)
I can't change the DB setup, it's too much work currently - a new version is in the works but I need to get a couple of features added to the current one in the meantime.