Open form and add record

computerfreaks

Registered User.
Local time
Today, 03:18
Joined
Jan 25, 2002
Messages
16
I have a form which can be opened via two buttons, the one button will open the form and find specific data based on a combo box..... I want the other button to open the form and goto a new record.

How do i do this? if the second form has the on Open property et to add new record then the button which displays specific data doesn't work.

TIA Computerfreaks
 
On On_Click of the 2 buttons, use this line to open the form in AddMode (go to the Add New Record)

DoCmd.OpenForm "YouFormName Here", , , , acFormAdd

and use this line for the other.

DoCmd.OpenForm "YouFormName Here", , , , acFormReadOnly

If you also want to edit the data, just replace acFormReadOnly with acFormEdit.
 

Users who are viewing this thread

Back
Top Bottom