End Sub
Private Sub ExitForm_Click()
' User wants to bail
' If an edit in progress..
If (Me.Dirty = True) Then
' Clear it
Me.Undo
End If
' And close me
DoCmd.Close acForm, Me.Name
End Sub
Private Sub SavePrintClose_Click()
On Error GoTo Err_SavePrintClose_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_SavePrintClose_Click:
Exit Sub
Err_SavePrintClose_Click:
MsgBox Err.Description
Resume Exit_SavePrintClose_Click
End Sub
END OF CODE
CodeEndsHere-------
--
Sincere Thanks Ahead of Time
Ken Snell said:
If you can zip up the database with that form in it (strip out unnecessary
objects) and email to me, I'll take a look.
Remove "this is not real" from my reply email address.
--
Ken Snell
<MS ACCESS MVP>
Ronnie said:
No OutDate is on the main form and I am putting the code in on the
onload
event
--
Sincere Thanks Ahead of Time
:
This OutDate control isn't by any chance on a subform and your code
runs
in
the main form, or vice-versa?
--
Ken Snell
<MS ACCESS MVP>
OutDate is a field that was draged from the field list to the form. I
believe it makes it a control is that a correct.
--
Sincere Thanks Ahead of Time
:
What is OutDate? A field in the form's recordset? A control on
the
form?
What type of control?
The error that you see indicates that either OutDate is not a control on
the
form, or that OutDate is a control that does not have a SetFocus method
(such as a label).
--
Ken Snell
<MS ACCESS MVP>
I have the following code and I have tried everything. Can anyone
tell me
why I get this error ont the OutDate field
"Method or Data member not found!"
This is the code...
Private Sub Form_Load()
Me.SoftwareID = Forms![frm-Software Media Library].[SoftwareID]
Me.Command33.Visible = False
Me.OutDate.SetFocus
'Forms!frm-SoftwareCheckoutHistory!OutDate.SetFocus
'frm-SoftwareCheckoutHistory!OutDate.SetFocus
End Sub