Project Selection for Backend Data (1 Viewer)

JuniorWoodchuck24

Registered User.
Local time
Today, 01:22
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
 

twoplustwo

Registered User.
Local time
Yesterday, 23:22
Joined
Oct 31, 2007
Messages
507
Try Debug.Printing the Me.OpenArgs in break mode and tell us what you get
 

JuniorWoodchuck24

Registered User.
Local time
Today, 01:22
Joined
Jan 13, 2010
Messages
59
It gives me the following:

"OverallProjectReport-101" for the StrProj value and gives me an 3011 Error
 

JuniorWoodchuck24

Registered User.
Local time
Today, 01:22
Joined
Jan 13, 2010
Messages
59
The filter is used due to what is in the Table:

OverallProjectReport (Table)
OverallProjectReportConvert (Query that converts table info)

So user can select a conversion report if they wish

That's why I use the filter statement. The OpenArgs is pulling in the correct number based on which project I select 101 for 101 and 102 for 102.
 

Users who are viewing this thread

Top Bottom