G
Guest
I am doing something similar to neeraj in the question of 8/3/2005. I am
using a form to list possible reports to print. My question is, how can I
check to see if a report exists prior to opening it? I figured out how to
deal with an error if they didn't select a report, but am not sure how to
proceed if they select a report and it doesn't exist. This is in case the
report name is misspelled in the report listing or someone deleted the report
manually (we may be changing what reports exist in the future). I am
including neeraj's message only for reference. Thanks for your help.
neeraj's message of 8/3/2005
I have a macro written into the 'On Click' event of an OK button of a form.
This macro has got just one command row:Open Report. For the 'Report Name'
field, I am trying to pass the report name from the value selected from a
list box in that form. The Report Name field says:
[Forms]![myForm]![lstReports]
where [lstReports] is the name of that list box
When I hit the OK buton, it doesn't open the report and gives an error
message saying that
"The report name [Forms]![myForm]![lstReports] that you entered in either
the property sheet or the macro is either mispelled or doesn't exist"
How can I make this work?
using a form to list possible reports to print. My question is, how can I
check to see if a report exists prior to opening it? I figured out how to
deal with an error if they didn't select a report, but am not sure how to
proceed if they select a report and it doesn't exist. This is in case the
report name is misspelled in the report listing or someone deleted the report
manually (we may be changing what reports exist in the future). I am
including neeraj's message only for reference. Thanks for your help.
neeraj's message of 8/3/2005
I have a macro written into the 'On Click' event of an OK button of a form.
This macro has got just one command row:Open Report. For the 'Report Name'
field, I am trying to pass the report name from the value selected from a
list box in that form. The Report Name field says:
[Forms]![myForm]![lstReports]
where [lstReports] is the name of that list box
When I hit the OK buton, it doesn't open the report and gives an error
message saying that
"The report name [Forms]![myForm]![lstReports] that you entered in either
the property sheet or the macro is either mispelled or doesn't exist"
How can I make this work?