Opening form to a new record

dcjones

Dereck
Local time
Today, 10:10
Joined
Mar 10, 2004
Messages
108
Hi All,

And before I ask for more help, I think I should say a very big thank you to all the members of this Forum for all there help you give each other.

I have the code which opens my form but not to a new record. Can anyone see what I have done.

Private Sub Command298_Click()
On Error GoTo Err_Command298_Click


DoCmd.OpenForm "ResettlementReferralAddClientForm", acFormAdd

Exit_Command298_Click:
Exit Sub

Err_Command298_Click:
MsgBox Err.Description
Resume Exit_Command298_Click

End Sub

Kind Regards


Dereck
 
2 approach...

approach 1: You can use acFormEdit

approach 2: You dont really need acform whatever, Access will open the record in editable mode.

Good Luck
Dianna Goldsberg
 
Hi and thanks for the reply,

I have tried "acformedit" but it opens the form to the forst record and not a new record.

Any ideas,

Many Thanks


Kind regrads, keep safe and well.

Dereck
 
Put acFormAdd in its correct position:-

DoCmd.OpenForm "ResettlementReferralAddClientForm", , , , acFormAdd
 
AcNewRec

On the form property, On Open Event

DoCmd.GoToRecord , , acNewRec

=====================================

Sorry, i thought you want to open a record. for new record you can use above code or what jon suggested.
 
Last edited:
Hi and Thanks a million, it works fine.


Many thanks, keep safe and well.

Dereck
 

Users who are viewing this thread

Back
Top Bottom