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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Count Records then have Message Box for Action 2
doCmd.Requery 8
Do Cmd code for after update 2
command code 5
VB code 1
Problem with query criteria 6
transfer a field using button 1
some subforms and combos blank 6

Top