Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a record from Access data base using programming from excel
Hello, I have some program written in MS excel macro. And from there I a trying to delete a record with a condition from a MS Access database. am not been able to get the code right. Can any one help me with sampl code please. My scenario would be as follows: I have a Employee salary table having feilds as EMPNO, Month and SAL. Now with my current code all the records are getting deleted from th Salary table. I would like to delete the record of a particular employee from th salary table. But I am not been able to provide the option EMPNo in m delete statement. Regards, Dipa -- dipa ----------------------------------------------------------------------- dipak's Profile: http://www.excelforum.com/member.php...fo&userid=2818 View this thread: http://www.excelforum.com/showthread.php?threadid=47710 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting a record from Access data base using programming from exc
Generically - use delete instead of select
whatever records would have been returned by select will be deleted With the DB open, since you are deleting the record you do not need anything between DELETE and FROM: CurrentDb.Execute "DELETE FROM MyTable WHERE EMPNO = ______ "; "dipak" wrote: Hello, I have some program written in MS excel macro. And from there I am trying to delete a record with a condition from a MS Access database. I am not been able to get the code right. Can any one help me with sample code please. My scenario would be as follows: I have a Employee salary table having feilds as EMPNO, Month and SAL. Now with my current code all the records are getting deleted from the Salary table. I would like to delete the record of a particular employee from the salary table. But I am not been able to provide the option EMPNo in my delete statement. Regards, Dipak -- dipak ------------------------------------------------------------------------ dipak's Profile: http://www.excelforum.com/member.php...o&userid=28181 View this thread: http://www.excelforum.com/showthread...hreadid=477102 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel user enter a store # to query Access data base | Excel Discussion (Misc queries) | |||
Chart connected to an Access data base | Charts and Charting in Excel | |||
Access data base is able to store any number of records | Excel Worksheet Functions | |||
Transfer Data from Excel 2000 to the Access data base | Excel Programming | |||
Import data from Access Data Base | Excel Programming |