Query to Form View

sadlerj

New member
Local time
Today, 04:33
Joined
Oct 7, 2005
Messages
9
I am wondering how you can output your query into a form. I have a form to select the information the end users is looking up, which refers directly to the query but how can I tell the query to place the results into a form view?
 
You will need to build a form with the query as its record source.
 
I have a form with the query as the record source (frmbasedonqry)but it is not working. Here is the database that I am trying to create this in.
 

Attachments

I think what Rich Means is that you will have to create a second form that is then opened once the criteria is selected in the form you mentioned. I have been known to be wrong. The only thing I am truely good at. *grin*
 
I just looked at your db.
Go to- tools
- database utilities
- switchboard manager
- click edit
- make sure that "Add Information" is highlighted
- click edit
- change the Open Form in Add Mode to Open Form in Edit Mode
- reselect your form
- click ok
- close out and open the form.


Is that what you want?

Rich
 
yeatmanj,

Thats what I meant initially until I looked at the attached database. The switchboard button doesn't seem to be set up properly. No other forms are needed.

Rich
 
Well, that's one less time for my wrong ratio. *smile*
 
What I am doing is using the frm Criteria to select the information that I would like to search for, this frm is tied to tblDevices Query. I would like to have the query output the query into frm frmbasedonqry, but it keeps outputing the information as a spreedsheet. Is thier a way to link the query to a form for it's output?
 
Your "Run" button is opening the table. Change the event on that button to:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmbasedonqry"
DoCmd.OpenForm stDocName, , , stLinkCriteria

And it will open your form, based on the query, which is based on the "Criteria" form.
 
It worked after I changed my form a little bit. Thanks for the help! One question how had would it be to take my critiria form and put combo boxes on it, would it require a lot of programming?
 
If you are talking about combo boxes to run the query. No programming at all. Create your combo boxes with the wizard on your Criteria form and then reference them the same way in your query and you are done.
 

Users who are viewing this thread

Back
Top Bottom