Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show date range on report

Status
Not open for further replies.

tarena

IS-IT--Management
Nov 28, 2005
70
US
I have a report that shows the date range that I selected to run the report...in the report properties, in the "control source" I put the following;

="Effeciency Report: " & Format([Forms]![frmGetDateRange]![dteStart],"mm/dd/yyyy") & " - " & Format([Forms]![frmGetDateRange]![dteEnd],"mm/dd/yyyy")

I did this in Access 97 on and machine running Windows XP Professional SP2...I open the report on a machine running Windows 2000 and Windows NT and all I get for my date range is "Name" can I fix this?

Thank you
 
Is the format function working? Have you checked for missing references?
 
Seems to be working. The rest of the formatting is working just fine. I have backcolors and forecolors that change due to values and that works on all computers.
 
Here is my code that works of XP computers but not 2000 or NT;

Private Sub Report_Error(DataErr As Integer, Response As Integer)
'credit: see top of module
Const adhcErrNoRecordSource = 2580

Select Case DataErr
Case adhcErrNoRecordSource
MsgBox "This report is bound to a table or " & _
"query that doesn't exist: '" & _
Me.RecordSource & "'", vbExclamation
Case Else
MsgBox "Access Error #: " & DataErr & "@" & AccessError(DataErr) & "@ "
End Select
DoCmd.Close acForm, strForm
Response = acDataErrContinue
End Sub

Private Sub Report_NoData(Cancel As Integer)
'credit: see top of module
MsgBox "There aren't any rows to display!"
' Close the parameter form, as well.
DoCmd.Close acForm, strForm
' Tell Access to just skip it.
Cancel = True
End Sub

Private Sub Report_Open(Cancel As Integer)
'credit: see top of module
'Report Open event happens before Activate event.
' Set the global variable.

strForm = "frmGetDateRange"

DoCmd.OpenForm FormName:=strForm, WindowMode:=acDialog

' Set the Cancel flag if the form isn't still open.
' That would mean the user pressed the Cancel button.
'CV: uses my function IsLoaded instead of IsOpen
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top