Sub sub form referencing

dichotomous

Registered User.
Local time
Tomorrow, 12:01
Joined
Oct 19, 2012
Messages
62
Database help needed. Ok. Putting it out there. I need some help. I've googled till I'm blue in the face - literally.

I have a sub form within a sub form and I need to reference a combo box on the sub form. Access only seems to write to the first sub form level.

Here's my syntax:

[forms]![Mainformname]![1st.subform].[form]![2nd.subform]![combobox]

This is a macro - after update event.

The problem is, access shows you the 2nd subform, but, I can't seem to be able to reference any of the controls on it????

The reference is so that the combo box will filter based on a synched combo box's selection which runs a requery event.

Anyone out there who knows the answer, please, please, save me some more hours of reading - thanks in advance.
 
looks like you are missing a form before your combobox

see this link for referring to nested subforms

http://support.microsoft.com/kb/113352

You can have up to seven nested levels from (I think) 2003, prior to that it was three.
 
Hi there CJ. Thank you for taking the time to reply.

So is it:

[Forms]![mainformname]![Subformname].[form]![secondsubform].[form]![Control]

Because, if it is, access wont show me available controls after the last .[form]!

and if I just type it in, it doesn't work.

Thanks in advance.

Alastair
 
Are you use Subformname, make sure that is the name of the sub form control on the parent form, not the name of the saved form.
 
if you checked the link which is....

Forms![main form name]![subform control name].Form![nested subform control name].Form![control name]

you will see it is not quite the same as what you have

[Forms]![mainformname]![Subformname].[form]![secondsubform].[form]![Control]


And as Cronk says - if 'nested subform control name' is the same as 'secondsubform' it should work

Although I note you are using macros rather than VBA so it might be there is a restriction with macros with regards number of levels
 
Thank you all for your answers. I'm going to be working on the DB over weekend so shall post feedback on the results. Many thanks for taking the time to help me. Alastair.
 
Yes, macro's may be the issue (level wise). However, I've heard that when you make your DB for the web, vba code is not helpful. I have to do more research on this, but.... any comments?
 
you make your DB for the web
Ah - better explain the environment you are using - access version/web/client etc? if it's web, I understand different rules apply. You might have more luck if this was on the web app forum rather than forms
 

Users who are viewing this thread

Back
Top Bottom