Changing record source with cmb

aronw

Registered User.
Local time
Today, 22:45
Joined
Dec 2, 2002
Messages
31
OK, I need to be able to change the control source (query) at the click of a button on / for my forms.

I have 3 tables that are joined with a query and populate my forms currently. I have created copies of these 3 tables which are identical except the name of the tables. Basically I wish to be able to use my extisting forms to display the same data but from different tables.

I do not know the syntax to put behind the 'onclick event' of the command button. Can anyone help me with this? Or suggest a better way of doing it.

TIA

Aron
 
In the OnClick event of your button try:

me.recordsource = "YourQueryNameGoesHere"
me.requery

HTH
Patrick.
 
That is exactly what I was after. Thanks PaddyIrishMan for the rapid response.

Aron :D
 

Users who are viewing this thread

Back
Top Bottom