Can A Query be opened up into a form?

J

jimswinder

Was wondering if when I run a query it can be opened up into a form rather
than a table? I was wanting to format it to look like more than a table...and
then wanted to add several buttons in the footer, if that is possbile. Also,
is it possible to double click on a record within a table to transfer certain
fields of that record to another form?

Thanks,
 
S

SusanV

Hi Jim

Create a new form and set the query as the source.

As to clicking on a record in a table, tables don't have click properties
that way, forms do.
 
J

jimswinder

Hey Susan...

Thanks for your help. I was able to create the form, but what I really need
is this:

I want to run a query (from a form) where I can input the criteria (I have
several different fields I can input criteria into) and when that query runs
it shows the results in a from as opposed to a typical table becasue I want
to be able to "double click" on one of the records to "transfer" that record
data into another form.

Confused? :)
 
S

SusanV

To be able to click on a field like you're saying use a Continuous data
sheet form, so it looks like a table but has form fields with events you can
trigger. For example, I have a db for generators. Users work mainly with the
form "frmContracts" and next to the Job Code textbox (fldJobCode) there's a
lookup button which opens the form "frmSelectCustomer" which lists all the
customers in a continuous form. Users can double click on Customer name,
company name, state, or generator manufacturer or model to filter the main
form's records.

On each field's Double Click event I have code similar to the following
which re-opens the frmCustomers form filtered on this data and closes
frmSelectCustomer:

Private Sub fldJobCode_DblClick(Cancel As Integer)

Dim stLinkCriteria As String
Dim stDocName As String
stDocName = "frmContracts"
stLinkCriteria = "fldJobCode = '" & Me.fldJobCode.Value & "'"

DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmSelectCustomer", acSaveNo

End Sub
 
Top