I am using the following code in a backend updater that's on roger's access library. Testing on two machines mine is running XP Home w/A2K3 and gets a error 3270. The other XP Pro w/A2K and works perfectly.
I have verified that the DAO reference is 3.6 on both. Everything seems to update expect for a lookup field where the version number changes to include changes that have been made.
I have read on the net about error trapping a 3270, but not exactly sure where or if I should put it in.
I would appreciate any assistance.
I have verified that the DAO reference is 3.6 on both. Everything seems to update expect for a lookup field where the version number changes to include changes that have been made.
I have read on the net about error trapping a 3270, but not exactly sure where or if I should put it in.
I would appreciate any assistance.
Dim varOldValue As Variant
Dim prp As DAO.Property
Dim varRetval As Variant
On Error GoTo adhSetProp_Err
varOldValue = obj.Properties(strName) '<--------ERROR
On Error Resume Next
obj.Properties(strName) = varValue
adhSetProp = varOldValue
adhSetPropExit:
Exit Function
adhSetProp_Err:
Select Case Err.Number
Case adhcErrNotInCollection
varRetval = AddProp(obj, strName, varValue)
If IsError(varRetval) Then
adhSetProp = varRetval
Resume adhSetPropExit
Resume Next
End If
Case Else
adhSetProp = CVErr(Err.Number)
Resume adhSetPropExit
End Select