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.
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:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.