Does anyone know why the following code would work in Access 2000 but give RT Error 91 in Access 2003? The code is behind the opening form of an Access 2000 formatted DB.
This is the first day I've run across this problem (migrating from Access 97). The current time of day is 3:20PM PST, so the "ElseIf Time() > 0.5 And Time() < 0.75" is evaluating to true. The highlighted line for the Run-time error is the bolded line in the above code. Again, this is only happening when the DB is launched in Access 2003 - it worked fine in Access 97 and Access 2000.
Any help is always appreciated, thanks!
~Melagan
______
"It's never too late to become what you might have been.
Code:
Private Sub Form_Load()
'When the database is opened display welcome user message.
hourglasson = True
'Display "Good Morning"
If Time() < 0.5 Then
[lblMorning].Visible = True
[lblAfternoon].Visible = False
[lblEvening].Visible = False
'Display "Good Afternoon"
ElseIf Time() > 0.5 And Time() < 0.75 Then
[b][lblMorning].Visible = False[/b]
[lblAfternoon].Visible = True
[lblEvening].Visible = False
'Display "Good Evening"
ElseIf Time() > 0.75 Then
[lblMorning].Visible = False
[lblAfternoon].Visible = False
[lblEvening].Visible = True
End If
End Sub
This is the first day I've run across this problem (migrating from Access 97). The current time of day is 3:20PM PST, so the "ElseIf Time() > 0.5 And Time() < 0.75" is evaluating to true. The highlighted line for the Run-time error is the bolded line in the above code. Again, this is only happening when the DB is launched in Access 2003 - it worked fine in Access 97 and Access 2000.
Any help is always appreciated, thanks!
~Melagan
______
"It's never too late to become what you might have been.