473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Automate Access from Excel

Hi All,

I have a requirement to automate Access functionality from Excel. I need to open Access, trigger button events and close Access from Excel.

I Achieved opening Access from Excel. I cannot find a way to trigger a button click event from Excel for an Access form.

To be more precise,
I have Access db called a.mdb. a.mdb has a.form and a.command button inside the form
I have xls sheet called b.xls. How I will fire an onclick event for a.command if I have already access a.form and a.mdb.


Any help greatly apprecaited, How a tight deadline coming up
Nov 7 '06 #1
3 4880
MMcCarthy
14,534 Expert Mod 8TB
When you open the access database. You need to open the form first.

DoCmd.OpenForm "frmName"

then you need to call the button click event as follows:

commandBtnName_OnClick


Hi All,

I have a requirement to automate Access functionality from Excel. I need to open Access, trigger button events and close Access from Excel.

I Achieved opening Access from Excel. I cannot find a way to trigger a button click event from Excel for an Access form.

To be more precise,
I have Access db called a.mdb. a.mdb has a.form and a.command button inside the form
I have xls sheet called b.xls. How I will fire an onclick event for a.command if I have already access a.form and a.mdb.


Any help greatly apprecaited, How a tight deadline coming up
Nov 7 '06 #2
NeoPa
32,556 Expert Mod 16PB
I just tested that as I suspected that it wouldn't work because the event procedures on forms are always Private (I know - Oh ye of little faith!).
What I found was that the 'Forms("frmName").commandBtnName_OnClick' version doesn't work but that the 'Form_frmName.commandBtnName_OnClick' version does.
Nov 8 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
I just tested that as I suspected that it wouldn't work because the event procedures on forms are always Private (I know - Oh ye of little faith!).
What I found was that the 'Forms("frmName").commandBtnName_OnClick' version doesn't work but that the 'Form_frmName.commandBtnName_OnClick' version does.
Good catch.

Forgot it was private

Mary
Nov 8 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Larry Rekow | last post by:
ve built various web apps using Frontpage and/or ASP and Access, but now I'm trying to figure a way to do the following: My friend gets parts lists in invoices (they are in an excel spreadsheet)...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
3
by: John Marble | last post by:
I have around 400 excel files filled with data that I need to import in ACCESS. The tricky part is that they must be imported one at time, and properly corrected before importing the next one. I...
1
by: Michael Wu | last post by:
I wonder if anyone can shed some light on how to automate Excel from a C# program. What I like to do is this, 1) Find if an Excel spreadsheet is alreay opened (identify the Excel file path) 2)...
4
by: Ivan | last post by:
Hi All, I have tried to automate excel in vb.net and i found a problem that i can't find the solution in anywhere... i hope someone can help me in this group.... the problem is i try using...
15
by: Karl | last post by:
Hi all, I regularly use FTP to place Self Extracting Zip files on the web for remote users to update their datafiles. Works very nicely. I have automated the creation of the initial zip file (...
2
by: =?Utf-8?B?QWxleGFuZGVyIFd5a2Vs?= | last post by:
Is it possible to automate a COM object ebmeded in an excel document run the process and return the results in a C# .NET application? Or better yet extract the com object some how and just run it...
8
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a web site that automates excel. This site runs in server 2003. iis 6.0 office 2003 installed I moved this app to server 2008 iis 7.0 office 2003 installed Now when I try to automate...
8
by: billelev | last post by:
I have a number of models that I need to run at regular times each week. The models may be based in Access, Excel or a math based statistics package called R. The models may also be a combination...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.