Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Use Data In User Input Form

Status
Not open for further replies.

kai023

Technical User
Sep 6, 2005
5
GB
I have created a form for a user to input data. I want to use this data to generate a report, but I can not work out how to transfer the data from the form to a table, can anyone help me?
 
Set the table or a query based on the table as the form's Record Source. You can then use this table or query or create a new query for use in the report.

Have fun! :eek:)

Alex Middleton
 
Thanks Alex, however I don't think I explained myself very well, so I'll try again!

I have a form (frmAmendCreditClaim) that has a table (tblCreditClaims) as it's record source. The user selects a record to amend using a list box, then amends the selected record. What I want to do is then take this amended record off on it's own and print a report based on it. That's where I'm running in to difficulty.
 
Create a report from the query then open the report using code in a button as follows:

Code:
Dim Condition as String
Condition = "[Field1] = '" & [Forms]![Form1]![Combo1] & "'"
DoCmd.OpenReport "Report1", acViewPreview, , Condition

Replace "Field1" with the field used to filter the table and "Form1", "Combo1" and "Report1" with the names of the form, control that selects the record, and the report that you want to open. The above works if the filter field is a string. For a numeric field use:

Code:
Condition = "[Field1] = " & [Forms]![Form1]![Combo1]


Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top