I have a decent amount of experience with SAS and Access, and I know how to call Access from VBA, but I am having a problem with table locks that I need help with.
Essentially what I am doing is running a proc freq in SAS, passing it to a table in Access so it can be read in a subform.
I have a form with some combo boxes where the user can select info about what variable they want the frequency of. Then they click a button and VBA passes those parameters on to SAS, and the subform populates with frequency data from SAS.
Everything works except the final part.
I have successfully taken the parameters from Access, passed them to SAS, and run the correct frequency. But during SAS's proc export back to Access, I get an error stating: "Exectute: The database engine could not lock table "FREQ" because it is already in use by another person or process."
The issue is that the table that SAS is exporting to is used in Access by the form that opens SAS.
Since I am obviously not using the form while SAS is processing, is there a way to have the form unlock or disconnect from the table so that SAS can access it, and then reconnect the table to the form after SAS finishes processing?
I tried splitting the database, but I got the same problem.