A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

the best way to talk to MS ACCESS



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old February 1st, 2010, 06:46 PM posted to microsoft.public.access.gettingstarted
Bre-x
external usenet poster
 
Posts: 103
Default the best way to talk to MS ACCESS

Hi,

On ms excel I have a sub to send a sql command to ms access

Dim objAcc As Object
Set objAcc = CreateObject("Access.Application")
objAcc.OpenCurrentDatabase "D:\1CNC\APPS\CNC_newapp.mdb"
With objAcc.Application
.Visible = False
'.DoCmd.RunMacro ("Macro1")
.DoCmd.RunSQL "DELETE FROM ttools where tid=7878 and pid=4324"
.DoCmd.Quit
End With

Is the best way to do it?

The db in question will be always open and that particular table will be
always open

Thank you all!!!

Bre-x


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.