Add New Data to Subform / Delete Selected Record from Subform.

D

Davie P

Hi,

I have a form with 1 single subform "frmHolidaySubform" displaying table
data (i.e. similar to a grid in VB). I also have a number of command buttons;
Add, Delete, Close.

When I press the 'Add' button I want the cursor to go to a new record in the
subform. I currently have the following code, but it will not achieve what I
am trying to do:

Me!frmHolidaySubform.SetFocus
DoCmd.GoToRecord acActiveDataObject, , acNewRec


Also, when I press the 'Delete' button I want to delete the selected record
in the subform. I have no idea how to do this!?!

I cannot use recordsets to achieve this as we will be using third party
software to convert the database and setup auditing on all forms.

Thanks in advance,
Dave
 

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