L
Laurel
I have an application which behaves differently on a machine with one
version of Access/VB than on another. We don't have the option of upgrading
Access because these are machines which have been given to my son for use in
his classroom in the Boston Public Schools (classroom for "behaviorally
challenged" 7th and 8th graders) - given to him, not the school system (he's
creative that way.) He doesn't have the software, he just has what's on the
machines. I'm hoping I can modify my code so it will work on the older
version. The code in question is below. The error occurs on
[txtWeekDay]=fncWeekDay([txtScore_Date]). Control is transferred to
"gs_temp = ...." as soon as we "step into" that line. We never enter
fncWeekDay(). The code for fncWeekDay() is at the bottom of this message.
[txtWeekDay] and [txtScore_Date] are unbound text boxes with nothing defined
for Control Source.
The databases are identical. We kept refreshing it to eliminate any
possibility of looking at the wrong copy, etc.
I've examined the references as they are identical in both environments.
Well... identical as to what you see checked in the references window -
dunno about the code the references are referring to.
I would really appreciate whatever creative thinking is out there with as
little of "did you try, etc" as possible, since I'm not able to debug this
on my own. I have to walk him through the debug process over the phone, and
he's the sort who has trouble sliding windows around to do stuff like
uncovering the Database window...
The versions that work: Access-9.0.6926 SP-3 VB-6.4.9969 Forms
3:2.01
The versions that don't: Access-9.0.3821 SR-4 VB-6.4.8714 Forms
3:2.01
Private Sub txtScore_Date_AfterUpdate()
On Error GoTo Err_txtScore_Date_AfterUpdate
Me.AllowAdditions = True
Dim li_debug As Integer
li_debug = 0
[txtWeekDay] = fncWeekDay([txtScore_Date])
Call SetButtonStates
Me.AllowAdditions = False
Exit_txtScore_Date_AfterUpdate:
Exit Sub
Err_txtScore_Date_AfterUpdate:
gs_temp = "txtScore_Date_AfterUpdate: " & Err.Description
MsgBox gs_temp
Resume Exit_txtScore_Date_AfterUpdate
End Sub
Function fncWeekDay(dtDate As Date) As String
Dim ls_temp As String
On Error GoTo Err_WeekDay
fncWeekDay = Format(dtDate, "dddd")
Exit_WeekDay:
Exit Function
Err_WeekDay:
ls_temp = "fncWeekDay: " & Err.Description
MsgBox ls_temp
Resume Exit_WeekDay
End Function
version of Access/VB than on another. We don't have the option of upgrading
Access because these are machines which have been given to my son for use in
his classroom in the Boston Public Schools (classroom for "behaviorally
challenged" 7th and 8th graders) - given to him, not the school system (he's
creative that way.) He doesn't have the software, he just has what's on the
machines. I'm hoping I can modify my code so it will work on the older
version. The code in question is below. The error occurs on
[txtWeekDay]=fncWeekDay([txtScore_Date]). Control is transferred to
"gs_temp = ...." as soon as we "step into" that line. We never enter
fncWeekDay(). The code for fncWeekDay() is at the bottom of this message.
[txtWeekDay] and [txtScore_Date] are unbound text boxes with nothing defined
for Control Source.
The databases are identical. We kept refreshing it to eliminate any
possibility of looking at the wrong copy, etc.
I've examined the references as they are identical in both environments.
Well... identical as to what you see checked in the references window -
dunno about the code the references are referring to.
I would really appreciate whatever creative thinking is out there with as
little of "did you try, etc" as possible, since I'm not able to debug this
on my own. I have to walk him through the debug process over the phone, and
he's the sort who has trouble sliding windows around to do stuff like
uncovering the Database window...
The versions that work: Access-9.0.6926 SP-3 VB-6.4.9969 Forms
3:2.01
The versions that don't: Access-9.0.3821 SR-4 VB-6.4.8714 Forms
3:2.01
Private Sub txtScore_Date_AfterUpdate()
On Error GoTo Err_txtScore_Date_AfterUpdate
Me.AllowAdditions = True
Dim li_debug As Integer
li_debug = 0
[txtWeekDay] = fncWeekDay([txtScore_Date])
Call SetButtonStates
Me.AllowAdditions = False
Exit_txtScore_Date_AfterUpdate:
Exit Sub
Err_txtScore_Date_AfterUpdate:
gs_temp = "txtScore_Date_AfterUpdate: " & Err.Description
MsgBox gs_temp
Resume Exit_txtScore_Date_AfterUpdate
End Sub
Function fncWeekDay(dtDate As Date) As String
Dim ls_temp As String
On Error GoTo Err_WeekDay
fncWeekDay = Format(dtDate, "dddd")
Exit_WeekDay:
Exit Function
Err_WeekDay:
ls_temp = "fncWeekDay: " & Err.Description
MsgBox ls_temp
Resume Exit_WeekDay
End Function