Jump to content

Recommended Posts

Posted

I 've got a script that simmulates keystrokes and stuff to run a report from aan access mdb unattended.

Is there a beterway now with the beta using com/obj?

Posted

Yes there most certainly is. Now what it is I dont know :). I havent gotten into COM as I dont need it currently. Check out MSDN for Access COM Objects.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Posted (edited)

Not sure if the term better applies.

Controlling Access is pretty straightforward without com/obj.

Many times I find a simple macro is simple enough at times and you can make a *.mam file up with access or do it yourself:

[shortcut Properties]AccessShortcutVersion=1

DatabaseName=sample.mdb

ObjectName=fix

ObjectType=Macro

Computer=MYComputer

DatabasePath=C:\sample.mdb

EnableRemote=0

CreationTime= 1c4bd38 c517620

Icon=265

this one simply runs the fix macro on sample database. (at the end it spits out a report and quits)

I do use the obj/com support for pulling out data and adding in data, so I don't have to open access at all.

sykes did a little spot in scraps, for more info see:

http://www.autoitscript.com/forum/index.php?showtopic=12281

overall obj / com just gives more choices, you can deside what is better.

Access automation via com at microsoft:

http://msdn.microsoft.com/library/default...._HV05187021.asp

You just need to make sure to open the database, ( or make a new one,)

here is a quick example:

$db="c:\\tempDB.mdb"

   $ObjIE=ObjCreate("Access.Application")
   $ObjIE.visible = 1
   $ObjIE.OpenCurrentDatabase($db)
   $ObjIE.DoCmd.OpenForm("form1")
   sleep(1000)

edit .. make sure to notice double \\ on filenpaths

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...