I've uploaded a database attached here called PMBooks1. It coughs and spits at the line:
Set rstRehab = myDb.OpenRecordset(rehabQuery)
I get an error message to the effect that VBA "expected parameters," but evidently was disappointed.
I know that the SQL is valid because I tested it in RehabTestQuery using 1 as the pvmt_analysis_section_id value. I also know that rstSections seems to be OK. I used the Debug.Print statement and it shows j being equal to 1, which it should be on the first record of rstSections. At that point, the line above where the program sputters, I'm attempting to open the rstRehab (rehabs on section #1) so I can number the rehab jobs in date order. BTW this is pavement rehab, not celebrity rehab
I can't figure this out, no matter how hard I try. I've searched and Googled and Help menued to no avail. Can anyone help? I would greatly appreciate any assistance.
Set rstRehab = myDb.OpenRecordset(rehabQuery)
I get an error message to the effect that VBA "expected parameters," but evidently was disappointed.
I know that the SQL is valid because I tested it in RehabTestQuery using 1 as the pvmt_analysis_section_id value. I also know that rstSections seems to be OK. I used the Debug.Print statement and it shows j being equal to 1, which it should be on the first record of rstSections. At that point, the line above where the program sputters, I'm attempting to open the rstRehab (rehabs on section #1) so I can number the rehab jobs in date order. BTW this is pavement rehab, not celebrity rehab
I can't figure this out, no matter how hard I try. I've searched and Googled and Help menued to no avail. Can anyone help? I would greatly appreciate any assistance.