Using the search button I made, I filter the results and then I have a button to generate a report but atm it just shows all the records and not just the ones left after i have filtered it, I would like to just see the filtered results on the report
Using this code on a button "generate report" I can bring up a report with all my records displayed.
Code:
Private Sub Genrpt_Click()
'Open report
DoCmd.OpenReport "rptassets", acViewPreview, , GCriteria
End Sub
I would like to know, is there a way to modify this code so the report uses my form to get its data? This is so when you use the search function on the form to filter the records down you can produce a report with only those records.
Edit: I have tried setting the record source in the report and the form the same but had no luck.
I don't really understand what you are doing. What you are trying to do should be very easy. Can you post an example of your database with the form that filter your records its source and the report you want to show the records? I will take a look at it.
Cheers!
Basically you open up frmView, click search enter the search criteria and it filters the records (select asset type in combo and type PC into textbox...Just a simple example), then when i click the generate report button I want it to show only those records and not every record
That's good at least it filters the report, is it possible to show all the results of the filter by clicking generate report or can you only show them in the report one at a time?
I don't know if I'm out of place here, but there is ALOT of M$ CD-Keys listed in his table. Can't we modify the example, not delete, so others can learn, but no one can take these keys.