I am having problems with placement of delimiters around the criteria part of the 2 expressions below:-
Place1 = "CCYP" ....CCYP is an OrgName listed in tblkOrgEmailAddresses
(1) ' WORKS OK
fred = (DLast("ReportName", "tblkOrgEmailAddresses", "OrgName = '" & "CCYP" & "'"))
' What I want to do is replace the hard coded name CCYP with a placeholder name eg:-
fred = (DLast("ReportName", "tblkOrgEmailAddresses", OrgName = Place1))
(2) ' WORKS OK
DoCmd.OpenReport fred, acPreview, "", "[CentreNamed]=""CCYP"""
I want to do is the same sort of thing here in the filter expression ie. replace the hard coded name CCYP with a placeholder name.
eg. ... DoCmd.OpenReport fred, acPreview, "", "[CentreNamed] = Place1.
Any ideas? Thanks for looking.
Steve.
Place1 = "CCYP" ....CCYP is an OrgName listed in tblkOrgEmailAddresses
(1) ' WORKS OK
fred = (DLast("ReportName", "tblkOrgEmailAddresses", "OrgName = '" & "CCYP" & "'"))
' What I want to do is replace the hard coded name CCYP with a placeholder name eg:-
fred = (DLast("ReportName", "tblkOrgEmailAddresses", OrgName = Place1))
(2) ' WORKS OK
DoCmd.OpenReport fred, acPreview, "", "[CentreNamed]=""CCYP"""
I want to do is the same sort of thing here in the filter expression ie. replace the hard coded name CCYP with a placeholder name.
eg. ... DoCmd.OpenReport fred, acPreview, "", "[CentreNamed] = Place1.
Any ideas? Thanks for looking.
Steve.