Query Results Into A Form

k5kowboy

Registered User.
Local time
Today, 21:13
Joined
May 28, 2003
Messages
13
I am trying to get the results of a query to show up in a form instead of in the results window. The query is run from a different form than the one I need the information pasted in. I have figured out the code to get the proper form to open up and also run the query, but I am unable to get the results of the query to display in the form. Thanks for the help.
 
The easiest way to display query results in a form is to display the results as a subform on the form.

While in form design, drag the desired query from the database window right onto your form.
 
Works great for displaying the results of the query. However, I need the information in a form so I can be able to add more information to it. Can I run a command that will copy the information from the query results and paste it in equivalent fields on a form? If so, how?
 
Use the query as the recordsource of the form. You can then construct the form as per normal.

If you wish to add / edit records via the query (or form based on query) you will have to ensure that the query you have created is an "updateable recordset".

Brad.
 
WOW....I can't believe I overlooked the simple things like that. Was looking WAY too deep into it I guess. Thanks for the help.
 
When you build forms and reports, start by selecting a query or table so that they will be bound. Then even if you don't use the wizard to build the first cut at the layout, you'll have a list of fields available from the form's recordsource. You can just drag them and drop them where appropriate and the form will be bound without having to fix up everything later.
 
Use the query as the recordsource of the form. You can then construct the form as per normal.

If you wish to add / edit records via the query (or form based on query) you will have to ensure that the query you have created is an "updateable recordset".

Brad.

Thanks UncGizmo for the Google tip...

How do you make the query into an updateable recordset ? Is this something you do at the query level or at the form level ?
 
Access makes queries updatable automatically except when it can't. If you have a query that is not updatable, search here or in help for some ideas on what might be the problem.

Non-updatable queries include but are not limited to:
Union queries
Totals queries
Crosstab queries
Joins of two tables where neither has a primary key or unique index.
Linked tables which do not have primary keys.
 

Users who are viewing this thread

Back
Top Bottom