K
Karissa
I have a report that gives a count of records for a date range. I want the
user to be able to run the report without having to choose the report screen
and find it on the list, but I want to maintain consistency in using the
date-range on the reports form (plus, I want it to be accessible from the
report menu without having two of the same report). My solution is for the
user to push the button and the report menu to open already populated with
the report name. I tried creating a macro to openform "frmdaterange" (the
reports form) and setvalue of "combo100" (the list of reports) to
"ReportName". It opened the form, but did not set the value. SO, I thought
perhaps I'd write a code for it. This is where I'm stuck...this is what I
have so far, working on one step at a time:
Public Function WinbackTargetCountByAnalyst(DateRange As String)
[frmDateRange] = DateRange
Docmd.OpenForm DateRange
End Function
I keep getting a compile error, external name not defined. When I change it
to:
Forms![frmDateRange] = DateRange
Docmd.OpenForm DateRange
I get "invalid use of property".
Help, please?
user to be able to run the report without having to choose the report screen
and find it on the list, but I want to maintain consistency in using the
date-range on the reports form (plus, I want it to be accessible from the
report menu without having two of the same report). My solution is for the
user to push the button and the report menu to open already populated with
the report name. I tried creating a macro to openform "frmdaterange" (the
reports form) and setvalue of "combo100" (the list of reports) to
"ReportName". It opened the form, but did not set the value. SO, I thought
perhaps I'd write a code for it. This is where I'm stuck...this is what I
have so far, working on one step at a time:
Public Function WinbackTargetCountByAnalyst(DateRange As String)
[frmDateRange] = DateRange
Docmd.OpenForm DateRange
End Function
I keep getting a compile error, external name not defined. When I change it
to:
Forms![frmDateRange] = DateRange
Docmd.OpenForm DateRange
I get "invalid use of property".
Help, please?