Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform and delete records on main form and subform

Status
Not open for further replies.

VBALearner

Programmer
Jun 28, 2002
10
US
Hi,

Wow this is my second request today.

I need help with the vba code for the command buttons to delete or cancel a record when you have a form with a subform. I am also using a one to many relationship between two tables.

Any suggestions,
Thanks
Eva
 
I haven't had any answers to my question yet. Hopefully today.

Thanks,
Eva
 
Hi Eva,

I don't know much VBA, so I can't help too much except to give direction, since you haven't got any other responses yet.

Why don't you add a "delete record" control button to a form using the wizard, then go and look at the code for the button?

Good luck,
Blaine
 
I had already tried that but what happens the data in my second table doesn'tget deleted. I am still working on it.

Thanks,
Eva
 
nevermind finally got it to work.

I didn't create the original form and subform so I didn't notice that the primary key on the subform wasn't set up to equal the one in the main form.

Thanks,
Eva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top