jeffreybrown
Registered User.
- Local time
- Today, 16:03
- Joined
- Aug 13, 2010
- Messages
- 15
I have a report which is opened through a cmd button with code on the On Click Event
Everything opens fine, but when I close the report it asks to save changes which none have been made by the user. I guess the fact the "Record Source" is getting updated makes the report recognize a change has taken place.
I tried placing
on the On Close Event of the report, but I still receive the "Do you want to save changes" dialogue box and when I click you the code debug to the DoCmd.Close code above.
What I am missing here?
Edit: I'm just closing the Report with the top right 'X'
Code:
Private Sub cmdMentor_Click()
Dim MentorSQl As String
MentorSQl = "select * from Force_Support_T where [Mentor Name] Is Null and [Centrally Managed Posn Type Desc]='Pal Acq (PAQ) Int Posn'"
DoCmd.OpenReport "rptMentorNull", acDesign
Reports!rptMentorNull.RecordSource = MentorSQl
DoCmd.OpenReport "rptMentorNull", acViewReport
End Sub
I tried placing
Code:
Private Sub Report_Close()
DoCmd.Close acReport, "rptMentorNull", acSaveYes
End Sub
What I am missing here?
Edit: I'm just closing the Report with the top right 'X'
Last edited: