opening a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Klaus

Add this line after all the other ones:
DoCmd.GoToRecord Record:=acNewRec
 
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

Back
Top