Open forms for new record

  • Thread starter Benjamins via AccessMonster.com
  • Start date
B

Benjamins via AccessMonster.com

Hi,

I have encountered some issue when i try to open form for new record

I use the following code on a command button to open a new form
DoCmd.OpenForm [FormName], , , , acFormAdd

But the report does not display new records

So I try to add the code to Form_Load
DoCmd.GoToRecord , , acNewRec
But there is an error message "You can't go to the specified records"

So I try to add the code to Form_Open but it still give the same error
message.

How do i rectify the issue?
 
B

Benjamins via AccessMonster.com

Found the porblem.

My Recordset Type is Snapshot instead of Dynaset
Hi,

I have encountered some issue when i try to open form for new record

I use the following code on a command button to open a new form
DoCmd.OpenForm [FormName], , , , acFormAdd

But the report does not display new records

So I try to add the code to Form_Load
DoCmd.GoToRecord , , acNewRec
But there is an error message "You can't go to the specified records"

So I try to add the code to Form_Open but it still give the same error
message.

How do i rectify the issue?
 

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

Top