NONE of Form_Current event code executing ?

liamfitz

Registered User.
Local time
Today, 14:37
Joined
May 17, 2012
Messages
240
Hello. I've got a Form_Current event that was working perfectly ( which fires for a new record selected, on my main 'Clients' form ). I changed no code, but am now getting 'User-defined type not defined', and NONE of the code is executing ( I've tested with a message box, as the first line after Private Sub declaration, and other debug techniques ) Can't see what the problem is. :banghead:
 
Can you post the code?

Have you tried commenting out any error handling you may have and seeing which line is highlighted when you go into debug mode after the error occurs?
 
Well I'll try- good thinking ...
P.S. vbaInet were you 'clutching at straws' with your confident-sounding response ? It's not that - and as I say, I made no changes to the code ! Certainly not something as fundamenatl as that ! Check your normal sub-routines' main or key events. They are, or certainly can be, Private.
 
Na, just a prompt. Yes it can be private if called from within the same object's module. Have you Compiled?
 
The user defined type not defined makes me think that something either is misspelled or perhaps the VBA project somehow got named the same as a procedure or something. That error might have nothing to do with this particular code but it is having problems overall.

Check the VBA project name (if this isn't the problem, try a DECOMPILE - but do it on a copy of the database):

attachment.php
 

Attachments

  • projectpropertiesproblem.png
    projectpropertiesproblem.png
    31.9 KB · Views: 345
Well I'll try- good thinking ...
P.S. vbaInet were you 'clutching at straws' with your confident-sounding response ? It's not that - and as I say, I made no changes to the code ! Certainly not something as fundamenatl as that ! Check your normal sub-routines' main or key events. They are, or certainly can be, Private.

TBF, if vbaInet, or bob for that matter, instruct you on something I tend to take it as gospel, they haven't let me down yet!!!!!!!!!!!!!!
 
I'm genuinely pleased for you rodmc ( it must make development easier than it might otherwise be ) , but like vbaInet, I'm a mere mortal and prone to make mistakes ( it was a general point, which I thought had been covered in the description - as it transpired a reasonable one ) I'm 'back up and running now' anyway, and all advice is appreciated and given consideration.
 
It's the thread that you've responded to. i.e this one.
 
Thank you for your interest and advice. Both you and BobLarson.
 
I meant, how did you resolve it?


Yeah, what was the resolution? (and I am not flawless by any means. I may have been spot on with rodmc's stuff to date, but I have been known to make mistakes and am still learning daily as well)
 
yep, no ones perfect, point being if you come on looking for help its not wise to be a little condescending to people that are trying to help. Granted that written communication can be picked up wrong where it wouldnt be verbally, so If I did pick up liamfitz wrong then apologies!
 
No problem. The difficulty with apparently succinct and confident 'solutions' ( without any questions obviously ) is they can come across as being provided with an absolute certainty that it will solve an issue - fine obviously when that is the case - but it's fair to say, that wasn't the case on this one, both before I checked, and subsequently. Thanks. I solved it by basically, recreating my form, also based on the query I was using in the 'problem form' and when that worked, without the bug, exported U.I. design and code into that. Set me back a couple of days, but almost back to where I was, and cleaned out some old/unused code and design I didn't need in the process.
 

Users who are viewing this thread

Back
Top Bottom