J
john ierston via AccessMonster.com
I have designed a basic d/base in access 97. On a form I can select a job
manager and month and then press a command button to run a report of
customers jobs for that selection. Where there are no jobs I get Runtime
error "you entered an expression that has no value. Here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Set the backstyle to normal (default is usually transparent)
YearEnd.BackStyle = 1
If Int((Now - YearEnd) > 516) Then
YearEnd.BackColor = vbYellow
Else
YearEnd.BackColor = vbWhite
End If
'Set the backstyle to normal (default is usually transparent)
Text24.BackStyle = 1
If Int((Now - YearEnd) > 516) Then
Text24.BackColor = vbYellow
Else
Text24.BackColor = vbWhite
End If
End Sub
The purpose of the code is to highlight in yellow any date older than 516
days and associated client name (text 24).
When I go to debug it highlights the line "If Int((Now - YearEnd) > 516)
Then".
I cannot seem to crack the problem . Any help very gratefully appreciated.
I am very much a novice! Thanks John
manager and month and then press a command button to run a report of
customers jobs for that selection. Where there are no jobs I get Runtime
error "you entered an expression that has no value. Here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Set the backstyle to normal (default is usually transparent)
YearEnd.BackStyle = 1
If Int((Now - YearEnd) > 516) Then
YearEnd.BackColor = vbYellow
Else
YearEnd.BackColor = vbWhite
End If
'Set the backstyle to normal (default is usually transparent)
Text24.BackStyle = 1
If Int((Now - YearEnd) > 516) Then
Text24.BackColor = vbYellow
Else
Text24.BackColor = vbWhite
End If
End Sub
The purpose of the code is to highlight in yellow any date older than 516
days and associated client name (text 24).
When I go to debug it highlights the line "If Int((Now - YearEnd) > 516)
Then".
I cannot seem to crack the problem . Any help very gratefully appreciated.
I am very much a novice! Thanks John