A
Andy
Hi;
When I was new to Access I use to create multiple queries with different
criteria for multiple reports:
qryItemsOnOrder Criteria >0 rptItemsOnOrder
qryItemsInStock Criteria >0 rptItemsInStock
Learned that can use strCriteria and only one qry and only one rpt
Dim strCriteria As String
strCriteria = "[ItemsOnOrder] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Or
Dim strCriteria As String
strCriteria = "[ItemsInStock] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
What I need to learn is how to pass "strText" to an Unbound Control in the
Report so that the rpt displays which report the user is viewing.
Dim strCriteria As String
strCriteria = "[ItemsOnOrder] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Me.[Reports].[rptItems].[TextToDisplay] = "Items On Order Report"
Or
Dim strCriteria As String
strCriteria = "[ItemsInStock] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Me.[Reports].[rptItems].[TextToDisplay] = "Items In Stock Report".
Have tried these and they don't work:
Me.[Reports]![rptItems].[Report]![TextToDisplay] = "ITWORKS"
Me.[Reports].[rptItems].[Report].[TextToDisplay] = "ITWORKS"
Both return: "Can't find the field "!", (exclamation point), referred to in
your extpression."
Me![rptItems].[TextToDisplay] = "ITWORKS"
'Returns: "Can'f find the field "rptItems" referred to in your extpression."
Would someone be so kind as to point me in the right direction.
Thank You.
Andy
When I was new to Access I use to create multiple queries with different
criteria for multiple reports:
qryItemsOnOrder Criteria >0 rptItemsOnOrder
qryItemsInStock Criteria >0 rptItemsInStock
Learned that can use strCriteria and only one qry and only one rpt
Dim strCriteria As String
strCriteria = "[ItemsOnOrder] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Or
Dim strCriteria As String
strCriteria = "[ItemsInStock] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
What I need to learn is how to pass "strText" to an Unbound Control in the
Report so that the rpt displays which report the user is viewing.
Dim strCriteria As String
strCriteria = "[ItemsOnOrder] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Me.[Reports].[rptItems].[TextToDisplay] = "Items On Order Report"
Or
Dim strCriteria As String
strCriteria = "[ItemsInStock] > 0"
DoCmd.OpenReport "rptItems", acPreview, , strCriteria
Me.[Reports].[rptItems].[TextToDisplay] = "Items In Stock Report".
Have tried these and they don't work:
Me.[Reports]![rptItems].[Report]![TextToDisplay] = "ITWORKS"
Me.[Reports].[rptItems].[Report].[TextToDisplay] = "ITWORKS"
Both return: "Can't find the field "!", (exclamation point), referred to in
your extpression."
Me![rptItems].[TextToDisplay] = "ITWORKS"
'Returns: "Can'f find the field "rptItems" referred to in your extpression."
Would someone be so kind as to point me in the right direction.
Thank You.
Andy