vivamario
08-21-2014, 07:13 AM
I want to take my data from a table and send it to a report. To do this, I have a small form where I select a couple of inputs to properly filter the data. This data is always changing, the number of selected columns, and rows will never be the same.
The first step is to select my data:
CurrentDb.OpenRecordset "SELECT My Fields FROM My Table WHERE My Filters
I believe that all works fine.
Then I need to build the report. I already have the report page created, it is just blank. This is my best idea so far: sending a bunch of labels and textboxes for each value I selected, but that seems stupid and it doesn't work (2465 error, can't find my field).
Set lblHNum = CreateReportControl(Report Name, acLabel, acDetail, , Label Text, 0, 0, 0, 0)
Set txtHNum = CreateReportControl(Report Name, acTextBox, acDetail, , Field Name, 0, 0, 0, 0)
What is the best way to do this? Building reports is very new to me. Reading material is also good, I don't even know what to google to find the answer I need.
The first step is to select my data:
CurrentDb.OpenRecordset "SELECT My Fields FROM My Table WHERE My Filters
I believe that all works fine.
Then I need to build the report. I already have the report page created, it is just blank. This is my best idea so far: sending a bunch of labels and textboxes for each value I selected, but that seems stupid and it doesn't work (2465 error, can't find my field).
Set lblHNum = CreateReportControl(Report Name, acLabel, acDetail, , Label Text, 0, 0, 0, 0)
Set txtHNum = CreateReportControl(Report Name, acTextBox, acDetail, , Field Name, 0, 0, 0, 0)
What is the best way to do this? Building reports is very new to me. Reading material is also good, I don't even know what to google to find the answer I need.