RE: On Click - open to new record
- From: JohnLute <JohnLute@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Feb 2007 09:06:01 -0800
That was it!
Thanks again!
--
www.Marzetti.com
"Klatuu" wrote:
My typo.
adDataForm should be acDataForm
I can't be sure that is the problem, but try that.
This is in the Load event of the form frmComplaints, right?
--
Dave Hargis, Microsoft Access MVP
"JohnLute" wrote:
DoCmd.GoToRecord adDataForm, Me.Name, acNewRec
--
www.Marzetti.com
"Klatuu" wrote:
I don't see a problem with the code. On what line do you get the error?
--
Dave Hargis, Microsoft Access MVP
"JohnLute" wrote:
"Klatuu" wrote:
Post back with the code as it is now, please.
Button:
Private Sub OpenComplaints_Click()
On Error GoTo Err_OpenComplaints_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmComplaints"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , , "New"
Exit_OpenComplaints_Click:
Exit Sub
Err_OpenComplaints_Click:
MsgBox Err.Description
Resume Exit_OpenComplaints_Click
End Sub
Form:
Private Sub Form_Load()
If Me.OpenArgs = "New" Then
DoCmd.GoToRecord adDataForm, Me.Name, acNewRec
End If
End Sub
- References:
- RE: On Click - open to new record
- From: JohnLute
- RE: On Click - open to new record
- From: Klatuu
- RE: On Click - open to new record
- From: Klatuu
- RE: On Click - open to new record
- Prev by Date: Re: Select all when control gets focus
- Next by Date: Re: Arrays
- Previous by thread: RE: On Click - open to new record
- Next by thread: Delete Records Or Not
- Index(es):