T
Ted
when using this vba code in my main form (a2k) and i modify the control's
date value to test it, a screen appears bearing the annoying error message
above. on the other hand, the field to get the calculated value (please refer
to the code below) on the form gets updated, so i guess there are two options
available: figure out what's behind the error and fix it -OR- figure out some
way to somehow suppress the messages since they seem to present only a
nuisance parameter in the scheme of things (unless i'm maybe
mischaracterizing them):
Private Sub On_Study_Date_AfterUpdate()
Dim Future_Visit As Date
Dim On_Study_Date As Date
Dim Months As Integer
Dim Answer As String
If Not IsNull(Me.RegNumber) And Not IsNull(Me.PtInitials) And Not
IsNull(Me.StudyNumber) Then
Me.Future_Visit = DLookup("FollowUp", "Query5")
Me.Months = DLookup("Months", "Query5")
End If
If Me.Dirty Then
DoCmd.GoToRecord , , acNext
DoCmd.GoToRecord , , acPrevious
End If
End Sub
any thoughts on this anybody?
-ted
date value to test it, a screen appears bearing the annoying error message
above. on the other hand, the field to get the calculated value (please refer
to the code below) on the form gets updated, so i guess there are two options
available: figure out what's behind the error and fix it -OR- figure out some
way to somehow suppress the messages since they seem to present only a
nuisance parameter in the scheme of things (unless i'm maybe
mischaracterizing them):
Private Sub On_Study_Date_AfterUpdate()
Dim Future_Visit As Date
Dim On_Study_Date As Date
Dim Months As Integer
Dim Answer As String
If Not IsNull(Me.RegNumber) And Not IsNull(Me.PtInitials) And Not
IsNull(Me.StudyNumber) Then
Me.Future_Visit = DLookup("FollowUp", "Query5")
Me.Months = DLookup("Months", "Query5")
End If
If Me.Dirty Then
DoCmd.GoToRecord , , acNext
DoCmd.GoToRecord , , acPrevious
End If
End Sub
any thoughts on this anybody?
-ted