New Record while opening a Form

softpro

Registered User.
Local time
Today, 16:22
Joined
Oct 23, 2001
Messages
23
Hi,

I want to display MyForm by Pointing to the New Record.
How to create a new record and point to that while opening a form.

Is there any straighforward way to specify that while opening a form.

MyForm should work in 2 modes, which is "Add" / "Edit".

Edit is quite straightforward I specify it in linkcriteria parameters "id= 999" while opening MyForm.

The Problem is for the Add Mode.

Thanks for your help.
 
Try:

DoCmd.OpenForm "MyForm", , , , acFormAdd

HTH

Brad.
 
I tried, but its not generating a new record.

Thanks !
 
After you have set your form into the add mode can you not do something like.

DoCmd.GoToRecord , , acNewRec


Hope this helps

Steve
 
Great, it works.

DoCmd.OpenForm "MyForm", , , , acFormAdd

The problem was we were not inputing one of the required field, so the record was not created due to that.

Thanks a lot for your help !
 

Users who are viewing this thread

Back
Top Bottom