to view data of a customer from union query

M

malegaonwala

sir i have different table having fields of similar names [cause 1)There r
male/ female workers in our office 2) there r temporary and permanent
workers.] and hence we have 3000 files of different categories, there are
about 12 tables, in which (there are about 4 main forms ,each have 3 subforms
having nearly 250/300 fields )
what i want is
i have made a union query containing this tables, and i want to open the
form directly from the union query rather then close the query and then open
the form manually
its a humble request to please show me a way out so that i can save my time
thanks
 
J

John Spencer

If you have the query as a saved query, then all you need to do is make the
query the record source for the form.

Opening the form will automatically run the query and display the records in
the form.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
D

Daryl S

Malegaonwala -

If you want to open a form based on a query, then set the form's
recordsource as the query. I would recommend backing up the database first,
as it sounds like you have some complexities due to subforms.

It is not clear if you are trying to replace the contents of the form,
subform, or both from the data in your new query. To replace just the form
or a subform with the new query, you would simply replace the recordsource
property of the form or subform, assuming all fieldnames stay the same.

If you want to change the main form and subform, then things get complicated.

For a normal subform to work (that is, remain linked to the main form
through a key value), you need different recordsources in your main form than
in your subform. If you want to keep this type of relationship, then you may
need to run a new summary query against your new detail query. The new
summary query can be the recordsource for the new main form, and the new
detail query would be the recordsource for the new subforms.

Or, you could just take your new query and use the form wizard to create a
new form based on the new query.

For more help, we will need more details, and a better idea of what you want.
 
J

John W. Vinson

sir i have different table having fields of similar names [cause 1)There r
male/ female workers in our office 2) there r temporary and permanent
workers.]

That is NO REASON to have separate tables.

All your workers could be on one table. This table could have a [Sex] field,
"M" for male, "F" for female; when you need to see information about people of
one gender, you could use a query selecting those records. Similarly, you
could have a Yes/No field [Permanent] to distiguish which employees are
permanent or temporary.

Your table design is unnecessarily causing your application to be much more
complicated!
 

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