New Record.....

Rogue Programme

Registered User.
Local time
Today, 15:56
Joined
Jul 16, 2003
Messages
55
I want to be able to open my main form with a command button that will automatically go to new record rather than record number 1.

Can someone help?
 
This is the code i have but doesn't work....

Private Sub cmdnewuser_Click()
On Error GoTo Err_cmdnewuser_Click

Dim DocName As String
Dim LinkCriteria As String

DocName = "frmcomplaint"
DoCmd.OpenForm DocName, , , LinkCriteria

DoCmd.GoToRecord , , A_NEWREC
Forms![frmcomplaint]![ClaimNo].SetFocus

Exit_cmdnewuser_Click:
Exit Sub

Err_cmdnewuser_Click:
MsgBox Err.Description
Resume Exit_cmdnewuser_Click

End Sub
 
Try:

DoCmd.GoToRecord , , acNewRec
 
do you only want new records in your form, if so just open it in append mode, not browse mode.
 

Users who are viewing this thread

Back
Top Bottom