Make all records on a form associate with a querie

W

weircolin

Hi There

Is there away to change the control sources of all the items on a form
use the same querie rather than having to change each of them
individually?

Colin
 
A

Allen Browne

Is there away to change the control sources of all the items on a
form use the same querie rather than having to change each of
them individually?

No.

You can alias the field names in a query (so they are consistent with the
form.)

You can use VBA code to loop through the controls if their names have some
consistency.

But before you do any of that, you might consider whether you have a good
relational design if you need to constantly change your field names.
 
F

fredg

Hi There

Is there away to change the control sources of all the items on a form
use the same querie rather than having to change each of them
individually?

Colin

Not sure I understand the question.
You currently have a form bound to 'TableA', with fields bound to
LastName, FirstName, and Phone.

You wish to change the form's record source to a query (QueryB) and
then change each control's control source to the fields of the query?

As long as the Query returns fields with the exact same field names,
all you need do is change the form's rowsource from TableA to QueryB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top