G
garret
Heres just a simple question that I was curious to ask after noticing
this pattern in almost every code sequence created by MS Access as well
as listed by the MVPs here:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[RunID]=" & me!RunID
DoCmd.OpenReport strDocName, acPreview, , strWhere
Why use strDocName and strWhere instead of just inserting
"rptSomeReport"...isn't this just a waste of variable space? And this
also limits the use of the strWhere if you have multiple code sequences
in one procedure (you wouldn't have strWhere2, etc.).
this pattern in almost every code sequence created by MS Access as well
as listed by the MVPs here:
Dim strDocName As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[RunID]=" & me!RunID
DoCmd.OpenReport strDocName, acPreview, , strWhere
Why use strDocName and strWhere instead of just inserting
"rptSomeReport"...isn't this just a waste of variable space? And this
also limits the use of the strWhere if you have multiple code sequences
in one procedure (you wouldn't have strWhere2, etc.).