Access User Group – Europe (1 Viewer)

isladogs

MVP / VIP
Local time
Today, 15:37
Joined
Jan 14, 2017
Messages
18,186
Sorry but I'm actually less clear what you are saying than before

Again there are several schools of thought.
Some people always use a different name for the subform control & the actual subform it contains
Others (including myself) always use the same name for both.

Both are valid in my opinion. Problems occur when developers aren't consistent in the approach used
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:37
Joined
Jul 9, 2003
Messages
16,244
EDIT:-
It is misleading because it returns the name of the form contained within the Subform/Subreport Control when the Subform/Subreport Control was created. If the original form is replace with another, then the name returned would be incorrect. It would be safer to extract the name of the form from the the Subform/Subreport Control.

Right I've got it!

That's what Karl is doing. I can see now he's extracting the name of the form here:- If Ctrl.Form
I missed that!!! I mistakenly thought he was using the name of the Subform/Subreport Control...
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:37
Joined
Jul 9, 2003
Messages
16,244
I mistakenly thought he was using the name of the Subform/Subreport Control...

Now I'm getting confused. Re-reading his code again, I see he IS returning the name of the Subform/Subreport Control. and not the Form within the Subform/Subreport Control. I don't get it? I'm missing something.....?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:37
Joined
Jul 9, 2003
Messages
16,244
I made a sample dB - See Attached:- Subform used multiple times knows itself
 

Attachments

  • Subform used multiple times knows itself_1a.zip
    26 KB · Views: 77

jdraw

Super Moderator
Staff member
Local time
Today, 11:37
Joined
Jan 23, 2006
Messages
15,364
Tony,

Can you list steps to use the database to see your intended results/demo?
If I click command0 on form1 I get error 2452 invalid reference to Parent??
Had to adjust
Code:
For Each Ctrl In Me.Parent.Controls
to
Code:
For Each Ctrl In Me.Controls  'Parent.Controls
to get past the err.

But maybe I'm missing your intent. I do recognize that Form1 does not have a Parent.

jack
 

isladogs

MVP / VIP
Local time
Today, 15:37
Joined
Jan 14, 2017
Messages
18,186
Hi Crystal
Yes I agree about both comments.
Karl's session was great. Good attendance and already around 250 views on YouTube
In advance of next month's session, I've already tried Thomas Moller's charts.js example app and its very impressive
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:37
Joined
Jul 9, 2003
Messages
16,244
Enjoying the conversation with yourself Tony??
Well, I make more sense than some people I could mention!

Something about the code bothers me, and that's why I was exploring it. I'll sleep on it and maybe I will be able to suss it out tomorrow....
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:37
Joined
Jul 9, 2003
Messages
16,244
Tony,

Can you list steps to use the database to see your intended results/demo?

Hi Jack, Apologies for my rushed example. I've re-done it - See Attached...
 

Attachments

  • Subform used multiple times knows itself_1b.zip
    28.3 KB · Views: 81

Users who are viewing this thread

Top Bottom