Title: Open Access routines using Boston Workstation

Pat,

 

I use the following script to connect to Access and run a macro. The script works as long as the PC is logged in with. Hope it will be useful.

 

Morris Benjamin, MBA

Programmer/Analyst

Centinela Freeman Health Systems

310-448-7833

 

Sub Update_Access()

Dim db As Object

   

    ChDrive "C"

    ChDir "C:\MoBox\OT\Accordis\DATABASE"

    temp2 = "C:\MoBox\OT\Accordis\DATABASE\ACCORDIS-EXCEPTION.mdb"

 

    temp1 = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"

    Shell (temp1 & " " & temp2)

    Wait 2

    Err = 0

    Activate "security warning"

    If Err = 0 Then

        Connect "security warning", stWindows

        Key "o"

    Else

        MsgBox "error"

    End If

    Wait 1

    Set db = CreateObject("Access.Application")

    Set db = GetObject("C:\MoBox\OT\Accordis\DATABASE\ACCORDIS-EXCEPTION.mdb")

    Wait 1

     db.DoCmd.RunMacro "mcrExport"

     Wait 1

     db.Quit

     Wait 0.5

    Set db = Nothing

 

End Sub

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Thomson
Sent: Wednesday, May 03, 2006 12:49 PM
To: [email protected]
Subject: RE: [Talk] Open Access routines using Boston Workstation

 

Hi Thom

 

Nice to hear from you again and I'm looking forward to the rescheduled session from today.  Always a tip to pick up in these sessions.

 

With regard to your feedback,  I have a variety of data sources requiring parsing, linking and consolidating and archiving prior to my import into my HIS system.  I'm thinking this would be more efficiently performed within my Access recordset routines?   My monthly upload into HIS would be from a consolidated table(s) that I would like in using data station.

 

Somewhat linking a variation of rules based and procedural routines...  

 

Please advise if conceptually this doesn't warrant use of BWS :

From my BWS script, I want to validate CSV data contents and then

- connect to my Access2003 database

- open my form,

- pass in a filename

- import file into an access table

- execute command buttons/macros etc. (parsing/consolidating/linking etc)

- once a month, another script will open the consolidate file access table for import into HIS system

 

Again, not sure what the connect routines would look like and how to reference a command button if this is possible.

 

 

Thanks

 

Pat Thomson

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: May 3, 2006 3:27 PM
To: [email protected]
Subject: RE: [Talk] Open Access routines using Boston Workstation

Greetings,

If I am understanding this correctly – you are going to have Access forms that will populate tables – then that info needs to get into the HIS (once a month).

The DataStation can read directly from Access tables (or from queries) similar to how you’d read from an Excel spreadsheet or flat file. So no need to “hook the form” into the script – or to embed the script into the Access application - this would be the easier approach and therefore my recommendation.

 

Let me know if I’m on the right track here.

 

Thom C. Blackwell

Product Manager

Boston Software Systems

www.BostonWorkStation.com

866 653-5105 - ex 807

[EMAIL PROTECTED]


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Thomson
Sent: Wednesday, May 03, 2006 3:01 PM
To: [email protected]
Subject: [Talk] Open Access routines using Boston Workstation

 

Has anyone experience running Access2000+ data load and form routines with  Boston Workstation?

Basically,  I am running a script to perform multi-file validation, then upon successful validation, I need to open an Access Form to load files into tables and perform various other access commands to accumulate and consolidate data. I will then run a nested script to archive the files I've loaded into Access.  Once a month,  I will import this consolidated data (from these Access tables)  into my HIS system.

I don't have Visual basic developers or Access developers and am thinking I need to do this through DAO however, if you have worked with interfacing Access forms with your scripts,  I would appreciate hearing from you.

Thanks

Pat Thomson


Support St. Joseph's Healthcare Hamilton. Donate today at www.stjoesfoundation.ca


Scanned by McAfee


Support St. Joseph's Healthcare Hamilton. Donate today at www.stjoesfoundation.ca

Reply via email to