Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Property Not Found

Status
Not open for further replies.

haj1503

Technical User
May 29, 2001
56
0
0
MY
Hi friend,

I received this message "Property not found" to the following function with Red color.

Public Function SetAppProp(prpName As String, prpType As Integer, prpValue)
Dim prp As Property
Const conPropNotFoundError = 3270
On Error GoTo SetAppProp_Err


CurrentDb.Properties(prpName) = prpValue

SetAppProp_Bye:
Exit Function
SetAppProp_Err:
If Err = conPropNotFoundError Then
CurrentDb.Properties.Append CurrentDb.CreateProperty(prpName, prpType, prpValue)
Set prp = Nothing
Resume Next
Else
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description, vbCritical
Resume SetAppProp_Bye
End If
End Function

Public Function GetAppProp(prpName As String) As Variant
On Error GoTo GetAppProp_Err
GetAppProp = Null
Const conPropNotFoundError = 3270

GetAppProp = CurrentDb.Properties(prpName)

GetAppProp_Bye:
Exit Function
GetAppProp_Err:
If Err = conPropNotFoundError Then
Else
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description, vbCritical
End If
Resume GetAppProp_Bye
End Function

Can somebody help me to solve this problem.

Best regards,

 
Hy Haj1503,

Why don't you try to define the type of the 'prpValue' in the declaration of your function.
Public Function SetAppProp(prpName As String, prpType As Integer, prpValue as ...?)

Hope it works
greetz
 
Hi DVh75,

Nice to meet you and thanks a lot for your replied to this discusssion.

Could you give me your e-mail address at least I can submit the sample DB for you look into.

hopefully you can tell me what are currently problem.

Best regards.
 
no problem
here's my adress: mentors_pupil@hotmail.com

please consider that these are my last two day's before my 2 weeks holiday. this means that after Friday i'll be gone for 2 weeks (finally ;-) )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top