Help!!

K

K Crofts

Hi. I have a form with a command button that when selected
will print the desired report, whoever, i need the report
to be specific to the date field that has been selected on
my form, not to print a report for every single seperate
date. below is my coding on the button, any ideas?

Private Sub Command84_Click()
On Error GoTo Err_Command84_Click

Dim stDocName As String
Dim strWhere As String
strWhere = "DateField=#" & _
Me.Calendar1 & "#"
stDocName = "10aConf"
DoCmd.OpenReport stDocName, acNormal, , strWhere

Exit_Command84_Click:
Exit Sub

Err_Command84_Click:
MsgBox Err.Description
Resume Exit_Command84_Click

End Sub
 
J

Jeff Boyce

What happens if you explicitly refer to the value of the calendar control
(you are using a calendar control, right?), with something like:

Me.Calendar1.Value
 
K

K Crofts

No joy im afraid, i have also tried to setfocus to this
but it will completely lock me out of the necessary
records and display a run-time error. is teher any way
around this or is it even possible do you know?
 
K

K Crofts

No joy im afraid, i have also tried to setfocus to this
but it will completely lock me out of the necessary
records and display a run-time error. is teher any way
around this or is it even possible do you know?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top