Error 3270

g28dman

Registered User.
Local time
Yesterday, 20:01
Joined
Nov 4, 2005
Messages
84
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.

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
 
I don't see where you have set obj. Do you have Option Explicit at the top of your class module?
 
Thanks for the reply - sorry didnt copy everything

Public Function adhSetProp(obj As Object, strName As String, varValue As Variant) As Variant
 

Users who are viewing this thread

Back
Top Bottom