JuniorWoodchuck24
Registered User.
- Local time
- Today, 03:58
- Joined
- Jan 13, 2010
- Messages
- 59
I've developed a database that starts with a user login and then allows the user to select a project number. The project number is then used as an OpenArgs to concatenate with a string to form a table's name. I'm having a syntax error with the following code:
Tables:
OverallProjectReport-101
OverallProjectReport-102
Forms:
ProjectList (user selects proj number 101/102/etc and makes OpenArgs = to that number)
StartPage (Has all the reports/forms for user)
Problem area:
Defined on Start Page VBA is StrProj as following:
StrProj = "OverallProjectReport-" & Me.OpenArgs
DoCmd.OpenReport "OverallReportView1", acViewPreview, StrProj
My problem is that StrProj on the filter (Do.Cmd 3rd part) is coming up as table doesn't exist. The error shows 'OverallProjectReport-101' does not exist. I'm thinking my error is in my syntax and that it believes that StrProj isn't a table name.
Tables:
OverallProjectReport-101
OverallProjectReport-102
Forms:
ProjectList (user selects proj number 101/102/etc and makes OpenArgs = to that number)
StartPage (Has all the reports/forms for user)
Problem area:
Defined on Start Page VBA is StrProj as following:
StrProj = "OverallProjectReport-" & Me.OpenArgs
DoCmd.OpenReport "OverallReportView1", acViewPreview, StrProj
My problem is that StrProj on the filter (Do.Cmd 3rd part) is coming up as table doesn't exist. The error shows 'OverallProjectReport-101' does not exist. I'm thinking my error is in my syntax and that it believes that StrProj isn't a table name.