object doesn't support this property or method when calling a function (1 Viewer)

shanegroff

New member
Local time
Today, 04:34
Joined
Jan 18, 2019
Messages
12
You don't have to use variables. Your code in cmdClose_Click in the Form_Incidents module says:
Call LogError(Err.Number, Err.descripton, "Incidents - check_values")

If you change that to
Call LogError(Err.Number, Err.Description, "Incidents - check_values")

Then it will work. The reason making variables worked is that Description was spelled correctly.
Otherwise it was correctly complaining that Err doesn't have a property called 'descripton'.

Note that the fact that VB didn't auto-capitalize for you was a hint that you had misspelled the property name.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:34
Joined
Aug 30, 2003
Messages
36,131
Thanks Shane. That should have been obvious to me. I think I should take the rest of the day off. :banghead:
 

isladogs

MVP / VIP
Local time
Today, 12:34
Joined
Jan 14, 2017
Messages
18,207
Welcome to AWF Shane

I recognised your user name & having just checked your profile, I now realise why.
I hope we will get the benefit of your detailed knowledge of Access on a regular basis.
 

Users who are viewing this thread

Top Bottom