opening a form

A

Amateur

Dear Sirs

How can I open a form so, that it opens immediately in the next record mode.
I have the following code to open that form:

Private Sub receivedpayments_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “receivedpaymentsâ€
stLinkCriteria = “[clientnumber] =†& Me![clientnumber]
Me.[dummyform].SourceObject = “receivedpaymentsâ€

How can I alter my code to tell the Form to open instead of showing the
first record – the “last plus one record� so that I can immediately to input
data when the for opens.

Thanks
Klaus
 
B

Bill Mosca, MS Access MVP

Klaus

Add this line after all the other ones:
DoCmd.GoToRecord Record:=acNewRec
 
W

Wayne-I-M

Private Sub receivedpayments_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “receivedpaymentsâ€
stLinkCriteria = “[clientnumber] =†& Me![clientnumber]
Me.[dummyform].SourceObject = “receivedpaymentsâ€

DoCmd.GoToRecord , , acNewRec
End Sub
 
Top