Problem referencing a control on a tabbed subform (1 Viewer)

June7

AWF VIP
Local time
Today, 06:10
Joined
Mar 9, 2014
Messages
5,425
You can try what I did. Build in another db. Might even be able to copy/paste controls and have it work. Then import into your original db.

However, if you can't build a new form/subform like this within existing db, might better build a brand new file. Unfortunately, importing existing forms in total to my db did not fix them.
 
Last edited:

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 03:10
Joined
Apr 1, 2019
Messages
713
June7 thanks. It took me so long to get to this point. I've learn't a lot but I cannot imagine starting again.
 

June7

AWF VIP
Local time
Today, 06:10
Joined
Mar 9, 2014
Messages
5,425
I know it's frustrating but unfortunately if file is corrupt you will likely have more problems with it. As I said, I could not create new forms in OP's db to do these calcs. That tells me there is something wrong with file. I suggest you confirm this by building test forms in a new file.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 03:10
Joined
Apr 1, 2019
Messages
713
June7, by way of a 'new file' do you mean like a new database project? Or should I recreate only the form(s) & try again?. Should I attempt to build like a dummy query & see whether I can locate the offending control(s) by building the reference using code builder? Just in case there is something strange with the control names that I haven't figured? Really appreciate the assistance.
 

June7

AWF VIP
Local time
Today, 06:10
Joined
Mar 9, 2014
Messages
5,425
Yes, a 'new file' means a new db project. You can try any number of things but it still might come down to having to create new file when all those other things fail. So yes, try recreating forms in existing db. If calcs still won't work, then something must be wrong with that file that corrupts forms. As I said, importing forms into my db did not correct them. Importing table and building forms in my db then importing forms to existing worked. But still could not build forms with those calcs in original db.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 03:10
Joined
Apr 1, 2019
Messages
713
I FIXED IT...at last. I made sure I had both [Inspector] &[Postedflags] Present on the subform, replaced the 2 offending code lines with;

Me.[Inspector] = Nz(GetUserName, "")
Me.[PostedFlag] = True

And made those controls invisible on the form. Works....

A big thank you for all who persevered with me. I await the day that I can help someone rather than always being the recipient of help.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:10
Joined
Oct 29, 2018
Messages
21,358
I FIXED IT...at last. I made sure I had both [Inspector] &[Postedflags] Present on the subform, replaced the 2 offending code lines with;

Me.[Inspector] = Nz(GetUserName, "")
Me.[PostedFlag] = True

And made those controls invisible on the form. Works....

A big thank you for all who persevered with me. I await the day that I can help someone rather than always being the recipient of help.
Hi. Congratulations! Good luck!
 

June7

AWF VIP
Local time
Today, 06:10
Joined
Mar 9, 2014
Messages
5,425
And now I am officially an idiot. The whole time I was reading that code I was seeing it as referencing field/controls on a different form (as dealt with for other OP), not the same form code was behind. Although full path referencing should have worked anyway (I just tested) it certainly isn't necessary.

Also glad you solved in spite of my crossed wires.
 

HillTJ

To train a dog, first know more than the dog..
Local time
Today, 03:10
Joined
Apr 1, 2019
Messages
713
June7, don't beat yourself up. I'm stoked that I can continue. I did recreate the tabbed form which fixed the 'activex' errors that you also found. I can see the end in sight!
 

Users who are viewing this thread

Top Bottom