B
Bob
running access 2k;
I have a form that opens a report, and an onclose event in the report
that updates a table when the report closes.
here's the code for my button's onclick event in the form:
DoCmd.OpenReport strRptname, acViewPreview
Reports(strRptname).FilterOn = False
Reports(strRptname).Filter = "pin = '" & pin.Value & "'"
Reports(strRptname).FilterOn = True
currently, for testing, my onclose event for the report simply is:
msgbox("updating my tables now")
What I want SEEMS very simple! - I want a user to push a button to open
a report, and when the report closes, I want to update a record in a
table.
What happens is this: the ---- onclose event triggers when the report
is opened!!!
If I open this report WITHOUT using a form - it works perfectly.
When I use a form to open it - onclose triggers TWICE - when the report
OPENS, AND when it closes!?!?!?
After monkeying around for untold hours, I cannot get what I want. I've
tried dozens of differing programmatic solutions - NONE work.
I either get the event triggered when the report opens (and closes), or
I get my msgbox Before I can even see the report.
anyone have a clue?
TIA - Bob
I have a form that opens a report, and an onclose event in the report
that updates a table when the report closes.
here's the code for my button's onclick event in the form:
DoCmd.OpenReport strRptname, acViewPreview
Reports(strRptname).FilterOn = False
Reports(strRptname).Filter = "pin = '" & pin.Value & "'"
Reports(strRptname).FilterOn = True
currently, for testing, my onclose event for the report simply is:
msgbox("updating my tables now")
What I want SEEMS very simple! - I want a user to push a button to open
a report, and when the report closes, I want to update a record in a
table.
What happens is this: the ---- onclose event triggers when the report
is opened!!!
If I open this report WITHOUT using a form - it works perfectly.
When I use a form to open it - onclose triggers TWICE - when the report
OPENS, AND when it closes!?!?!?
After monkeying around for untold hours, I cannot get what I want. I've
tried dozens of differing programmatic solutions - NONE work.
I either get the event triggered when the report opens (and closes), or
I get my msgbox Before I can even see the report.
anyone have a clue?
TIA - Bob