froggiebeckie
Registered User.
- Local time
- Today, 12:15
- Joined
- Oct 11, 2002
- Messages
- 104
Morning, all.
In a single user db, I've created an unbound form with Start and End date fields and several buttons to open reports.
My intention was to let my co-worker open the form, enter the Start and End dates once, then open several different reports, all using the same date range.
Everything works great, until I try to close the form using a "Close" button.
If I just "X" out of it, all is well,
But if I try to close the form using a "Close" button, I get a Runtime Error, related to Me.Dirty.
This is what highlites (in Bold & Italics) :
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
I could avoid the issue by just "X"ing out, but I'm curious as to why I can't use the Close Form button.
Any idea why?
Thanks,
BeckieO
In a single user db, I've created an unbound form with Start and End date fields and several buttons to open reports.
My intention was to let my co-worker open the form, enter the Start and End dates once, then open several different reports, all using the same date range.
Everything works great, until I try to close the form using a "Close" button.
If I just "X" out of it, all is well,
But if I try to close the form using a "Close" button, I get a Runtime Error, related to Me.Dirty.
This is what highlites (in Bold & Italics) :
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
I could avoid the issue by just "X"ing out, but I'm curious as to why I can't use the Close Form button.
Any idea why?
Thanks,
BeckieO