Hi all,
I’m looking for an elegant solution to achieve the following?
I maintain a club membership database, the principle tables of which are member_deatails (name + addresses etc) and club_membership (a members membership details by year). The tables are linked by a one-to-many field member_id.
Currently membership renewals are processed via a continuous form. membership_renewal (fields: member name + renewal yes/no check box) which is populated in the following way:
Firstly an append query adds a record for the new membership year (say 2009) to the club_membership table for all members who were members the previous year (2008).
I then populate the membership_renewal form with a query based on both the member_deatils and club_membership tables using the select criteria 2009 for membership year.
Finally I use a delete query to delete any 2009 entries in the club_membership table for unchecked (yes/no checkbox) members.
This all works fine, however elsewhere (single member updates) I’d also like to use the same membership_renewal form and background queries with different select criteria and this is where I’m struggling. I do not think form filters will work in this situation.
It would seem inelegant to me to have to create another renewal form and set of queries and this is where I’m looking for direction.
Should I be looking to use programmatically defined queries?
Is it possibly to modify the where criteria of query (much like a filter) programmatically?
Is it possible to specify a forms record source programmatically?
Many thanks,
Russell Skinner
I’m looking for an elegant solution to achieve the following?
I maintain a club membership database, the principle tables of which are member_deatails (name + addresses etc) and club_membership (a members membership details by year). The tables are linked by a one-to-many field member_id.
Currently membership renewals are processed via a continuous form. membership_renewal (fields: member name + renewal yes/no check box) which is populated in the following way:
Firstly an append query adds a record for the new membership year (say 2009) to the club_membership table for all members who were members the previous year (2008).
I then populate the membership_renewal form with a query based on both the member_deatils and club_membership tables using the select criteria 2009 for membership year.
Finally I use a delete query to delete any 2009 entries in the club_membership table for unchecked (yes/no checkbox) members.
This all works fine, however elsewhere (single member updates) I’d also like to use the same membership_renewal form and background queries with different select criteria and this is where I’m struggling. I do not think form filters will work in this situation.
It would seem inelegant to me to have to create another renewal form and set of queries and this is where I’m looking for direction.
Should I be looking to use programmatically defined queries?
Is it possibly to modify the where criteria of query (much like a filter) programmatically?
Is it possible to specify a forms record source programmatically?
Many thanks,
Russell Skinner