adding new records

  • Thread starter Sztranyovszky Tamás
  • Start date
S

Sztranyovszky Tamás

Hello,

I have a command button on my form with this code in its OnClick event:

DoCmd.OpenForm frm, , , , acFormAdd

The form "frm" is a form bound to a table. The problem is - I want form "frm" to allow add only one new record!



Thanks
 
D

Dan Artuso

Hi,
This might work for you.
Remove the navigation buttons on your "frm" form.
You do that from it's property sheet.

Then place a "Save" button on the form with this code in the click event:

Me.Dirty = False
DoCmd.Close

This way the user will not be able to navigate to another new record and the form will
close after saving the "one" new record.
 

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