Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2010, 08:12 AM
Registered User
 
Join Date: Mar 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Question on delete function

Hiya

i wish to use the on delete function, so when some one clicks on a form line delete, it checks a second table to delete information from there too.

two tables are

rep one speciality and rep multi speciality.

so if it matches the same forename, surname and company from the one special, and in the multi special it will delete from both these tables.

i can use realtionships, and the tables were setup with forrign keys to autonumbers ID, and each rep was enetered in a random order, so in each table a rep from one company will have a diffrent i.d in one table to another

i have found the form on delete and its showing as this at the moment

Private Sub Form_Delete(Cancel As Integer)

End Sub

but i dont know how to code it.

i have got a delete button on the form and it looks like this...

Private Sub Command37_Click()
On Error GoTo Err_Command37_Click

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Command37_Click:
Exit Sub
Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click

End Sub

but i don't know what code to add


please help

joeybird





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete file System.IO.Delete error maricar C# 13 March 14th, 2014 06:50 AM
php/mysql delete button and delete query dungey PHP Databases 17 April 11th, 2009 12:24 PM
finished javascript function to delete XML node crmpicco Javascript 1 April 20th, 2006 11:19 AM
how to delete a row when click delete hyperlink naveenkumarg1 Pro JSP 1 August 16th, 2004 01:29 AM
retreive function/Line from macro or function? MikoMax J2EE 0 April 1st, 2004 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.