automate macro run via switch input, rather than button click

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I presently have a macro that is run via clicking a form button. I need to
automate the process by replacing someone having to manually click the button
with an input from a photo eye switch, or proximity switch. My initial
thought is for Access to constantly monitor for a 0 or 1, or On or Off coming
from the switch, then respond accordingly by running the macro? Has anyone
done something similar? Any suggestions for how I can manipulate Access to
accomplish this automation?

Thank you.
 
Does your switch sends a signal that you can capture? if so use this signal
to open access to runa any macro inside your database and close the database
instead of having access check the switch
 
Our database needs to remain open all of the time, except for maintenance. I
think I would have to interface the switch data to the Access field via OLE.
If I can get the data from the switch to read into a field in Access could I
then write some code, like a loop or something, that would constantly check a
field for a 1 or 0, or On or Off. For example: If switchData = 1 Then
runMacro Else do Loop. What do you think about this?
 
I'm not familiar with extracting info frol OLE objects, but if your swich can
generate a text file as a log file, you can have the database import that log
every so often
 
Back
Top