I have a code that I use on a form that I am trying to modify to open a
report. It is not quite working. The code that I have modified looks like
this:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "EmpRpt"
stLinkCriteria = "[chrUserID]=" & "'" & Me![chrUserID] & "'"
DoCmd.OpenReport stDocName, , , stLinkCriteria
intView = acViewPreview
DoCmd.OpenReport "EmpRpt", intView, , strWhere
I have a form (EmpRpt) where the user selects chrUserID as well as a
BeginDate and EndDate. I want this code for a command button "On Click."
However, this is opening a report named EmpRpt and I want it to open in Print
Preview. Right now you can see it is not linking the dates and when I run
the code the labels pull up on the report, but not the data in the fields.
Any suggestions, I really know little about code.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200708/1