R
Ryan Diver
I've created a form based on a parameter query that allows a comma
separated list of values for searching the records. I have all of the
records based on that query in my form. I now want to produce a report
based only on the records that are in the form using a command
button.
I can create a report based on the same query, but it would require my
users to reenter their search parameters. How can I get the records I
already have in my form into my report?
I've tried using the OpenReport method but my syntax is incorrect. I
either get all possible records, or a request to enter the parameters
again which I want to avoid. Even if I get it to work, I think it will
only give me the one specific record being viewed. Can someone check
my syntax here? The variable rsnumber is text. Currently I'm getting
all records in the report.
Dim stDocName As String
stDocName = "rs report by number"
DoCmd.OpenReport stDocName, acPreview, , [rsnumber] = Me.
[rsnumber]
Or maybe I'm going about this all wrong?
FYI. I've only been working in Access for 2 weeks, and I don't know
VBA yet.
Please advise and thanks,
- Ryan
separated list of values for searching the records. I have all of the
records based on that query in my form. I now want to produce a report
based only on the records that are in the form using a command
button.
I can create a report based on the same query, but it would require my
users to reenter their search parameters. How can I get the records I
already have in my form into my report?
I've tried using the OpenReport method but my syntax is incorrect. I
either get all possible records, or a request to enter the parameters
again which I want to avoid. Even if I get it to work, I think it will
only give me the one specific record being viewed. Can someone check
my syntax here? The variable rsnumber is text. Currently I'm getting
all records in the report.
Dim stDocName As String
stDocName = "rs report by number"
DoCmd.OpenReport stDocName, acPreview, , [rsnumber] = Me.
[rsnumber]
Or maybe I'm going about this all wrong?
FYI. I've only been working in Access for 2 weeks, and I don't know
VBA yet.
Please advise and thanks,
- Ryan