0

I have a VBA module/script inside Microsoft Access db as seen in the image below.

Normally I just click on green play button and it runs fine. This is just a sample script. The real script has many more queries so running the individual queries through Python is not the option. i.e. I can't just extract out query2 and run in python.

How do I make the entire module addSample() run via Python however.

enter image description here

Zanam
  • 4,607
  • 13
  • 67
  • 143

1 Answers1

0

You can use a socket for communication between Access and your Python script. For Python, this is trivial to open and use a socket. For Access, you could use this solution in your VBA code. Once the socket is connected, just pass strings as command/status messages between the programs.

icodeplenty
  • 252
  • 1
  • 6