• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

access database automatic

I have an access database that has a form that will import a text file into a scanning software.  All I have to do is click the button on the form and the import happens.  I was wondering if there is any way that this can be done automatically?  Can access do scheduled tasks or is there another software that could perform this task?
1 Solution
Robert SaylorSenior DeveloperCommented:
Macro software can do this.

Here is one I googled: http://www.autohotkey.com/
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Access itself doesn't have scheduling built-in, but you can easily write something or simply use the Windows task scheduler, passing the name of a macro with the /x switch, or using /cmd switch to pass in arguments which you can then act on.

Most to the latter.

Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
All I have to do is click the button on the form and the import happens.

I like to create a separate front end that has a start up form the runs the code in the form's On Load event. Add a line of code to the end to .Quit. Once the database will auto run without any human interaction and close it is ready to be called from the Windows Task schedule.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Gustav BrockCIOCommented:
You can set the form to open automatically when Access launch your app.

Set the Timer Interval of the form to, say, 10000 for 10 seconds. The number is milliseconds.

Then use the Timer event of the form to call the OnClick event of your button:

Private Sub Form_Timer()
   ' Simulate a click of your button.
   Call btnImport_Click
End Sub

Now the button click event will fire every time the timer runs out.

mkramer777Author Commented:
I've requested that this question be deleted for the following reason:

Figured it out
Robert SaylorSenior DeveloperCommented:
What was your solution? Did any of us help you towards that solution?
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Please post the method you used, then accept your own comment as answer.


Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now