L
Lorenzo
Hello, I am trying to format a report in a way so that if I have two equal
dates I can somehow change the output of my report. I will first explain
what I am working on for a better understanding. This report is generated
by a query that has some imput parameters as arrival - departure dates. I
submit the dates and the report shows the list of arrivals for that timespan
I have chosen. In my report I have the following fields:
strReservationCode
dteArrival
strApartment
strNotes
....
....
I would like to be able to mark up for example changing the backColor
property when I have two arrivals on the same day:
Example: the report will have
resCode dteArr strApartment
03 01/01/2005 pippo
04 01/17/2005 pluto * backColor comes into play and
tells me I have 2 arrivals on 01/17/2005
05 01/17/2005 sempronio * backColor comes into play and
tells me I have 2 arrivals on 01/17/2005
06 01/01/2005 pippo
So far this is what I have ...
Sub controllaArrivi()
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim dteToCheckOne As Date
Dim dteToCheckTwo As Date
Dim strSQL As String
strSQL = "SELECT [dteDataArrivo] FROM qryReportArrivi " ' here I am not
considering the input parameter but should I?
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
rs.MoveFirst
Do While True
With rs
dteToCheckOne= rs!dteDataArrivo
End With
rs.MoveNext
dteToCheckTwo= rs!dteDataArrivo
If dteDaControllareUno = dteDaControllareDue Then
Me.dteDataArrivo.BackStyle = lngRed
End If
Loop
Set db = Nothing
End Sub
? Help !
Lorenzo (Italia)
dates I can somehow change the output of my report. I will first explain
what I am working on for a better understanding. This report is generated
by a query that has some imput parameters as arrival - departure dates. I
submit the dates and the report shows the list of arrivals for that timespan
I have chosen. In my report I have the following fields:
strReservationCode
dteArrival
strApartment
strNotes
....
....
I would like to be able to mark up for example changing the backColor
property when I have two arrivals on the same day:
Example: the report will have
resCode dteArr strApartment
03 01/01/2005 pippo
04 01/17/2005 pluto * backColor comes into play and
tells me I have 2 arrivals on 01/17/2005
05 01/17/2005 sempronio * backColor comes into play and
tells me I have 2 arrivals on 01/17/2005
06 01/01/2005 pippo
So far this is what I have ...
Sub controllaArrivi()
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim dteToCheckOne As Date
Dim dteToCheckTwo As Date
Dim strSQL As String
strSQL = "SELECT [dteDataArrivo] FROM qryReportArrivi " ' here I am not
considering the input parameter but should I?
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
rs.MoveFirst
Do While True
With rs
dteToCheckOne= rs!dteDataArrivo
End With
rs.MoveNext
dteToCheckTwo= rs!dteDataArrivo
If dteDaControllareUno = dteDaControllareDue Then
Me.dteDataArrivo.BackStyle = lngRed
End If
Loop
Set db = Nothing
End Sub
? Help !
Lorenzo (Italia)