Enabling Certain Controls

weekley,

the error is a "no current record" error. are you sure you have your db setup properly so it can take on all the advice you've gotten here? I'm thinking there's a slight chance that everything you've implemented so far from the advice that's been given has resulted in the unexpected errors you're now seeing because not enough info was given to begin with or not enough contingency was put in place before trying to advise on the original problem. I might be wrong. I'm wrong quite often as it is. do you wanna post the actual db file you're working with so people can make sure that's not what's happening?
 
I've tried a couple more things and manage to eliminate the error code although I did it by eliminating the error checking stuff and placed a 'On Error Resume Next' on the ButtonCloseProjectF.
I'm not at all familiar with error checking code.....yet.

My solution is a bit clumsy as it requires clicking the close button twice on the project form.... not sure why??

Please take a look at the uploaded database and let me know what I need to improved upon.

Thanks!
 

Attachments

I guess I don't follow Isladogs.
They are already disabled by default (as I understand it)
I have the Enable set to No for each combo box or text box on the Project form that
I do not want the user to enter data in, until the certain combo boxes and text
boxes are first filled in. That is was the ValidationOfControls does for me.

Is that what you are saying?

Hi
I've only just had time to look at your database and had various comments written but found these had already been made by MajP.

Removing If me.dirty =false fixed the issue with controls being enabled at form load
The messages are confusing and in one case it appears before the form is loaded. Add code to enable each control in turn or all at once to prevent further error messages. That should also solve error 3021

I would investigate the use of the Tag property as already mentioned

Also although you've ticked Require variable declaration (good!), that doesn't retrospectively alter existing code modules. Each code module should have Option Explicit as the second line. Add that then fix any compile errors arising.

Anyway, I'll bow out and leave you in the capable hands of MajP
 

Users who are viewing this thread

Back
Top Bottom