I inherited an access database that has many tables, forms, and queries. However, I am a PHP programmer, and VBA is very foreign to me. I was asked to make some changes that within a few days I was able to get work (with a lot of help from old random SO posts).
After transferring the database to users, the code that works on my computer does not work on them. It seems I have Access 2010 and they have 2007. As far as I can tell, the DoCmd.SetParameter function does not exist in VBA in Access 2007.
Here is the code snippet:
DoCmd.SetParameter "ReportYear", Year.Value
DoCmd.SetParameter "ReportMonth", Month.Value
DoCmd.OpenQuery "doFillData"
doFillData is a query inside Access, which is automatically added to another table, before starting it requires 2 parameters (year and month).
The obvious answer is to upgrade them to 2010, but I don't have that much power. I suppose I can create conditional code to do something different in 2007, but I cannot find a similar function to use. Does anyone have any idea?
source
share