Subform questions

peterzou99

New member
Local time
Today, 08:23
Joined
Jun 24, 2004
Messages
8
I built a subform in a switchboard. the subform is related to a regular form. the problem is that when i click the drop down menu in the subform combo box, the value did not show in the text box, but in the regular form, there is no problem. can anyone help me on this.
Thank you very much. :confused:
 
You must have some code that refers to a control on the subform improperly.

Forms!YourMainForm!YourControl

Forms!YourMainForm!YourSubform.Form!YourControl
 
Thanks, could you give me a little detailed information how to perform the control.
have a nice day.
 
how to perform the control
- I don't know what you are asking. I said that you have some code that is referencing a field incorrectly. When you need to reference a field on a subform, you need to include the name of the parent form as shown in my example.
 
Obviously Pat has something in mind here so I should refrain…

But I won’t… ;)

If it is an ‘external’ reference from say a Query to a Form or Sub Form then Pat is correct.

If it is an ‘internal’ reference to a Parent or Child then Pat is, how should I say this…incorrect.

Reason…

‘External’ references need to be made ‘objectively’. That is to say they must be made by stating the Form and SubForm name.
Ergo…Pat is correct.

But if ‘Internal’ references are required then they are better made with the Parent Property.
That is to say they are better not referenced directly but by variables or properties, if you can. Under those circumstances,
Pat is incorrect..

The aim, if you can, is best serviced by not stating the absolute name of anything, but rather to find a way to replace the absolute with a variable.

Under those circumstances, Pat is both correct and incorrect…and so am I.

Edit:
To correct a speling, spaling, speling.... spelling mistake.

Regards,
Chris.
 
Last edited:
Incorrect? Read the post again. The problem is most likely with the RowSource of the combo. In that case the reference is EXTERNAL so there was no need to confuse the poster with "how to reference a control from anywhere".
 
G’day Pat…

The posts, by you and me, do not conflict.

We don’t have a problem with this, and in my view…that’s a fact.

My posts are almost always in the ‘general’ sense until I know precisely that which is required.
But on this occasion your post was trying to answer a specific question and you are almost certainly correct. Almost.

You and I do not have that ‘Crystal Ball’ that predefines hindsight.
We all struggle for meaning in questions. You and I are no different in this.

Nor is the poster…
“so there was no need to confuse the poster with "how to reference a control from anywhere".
The poster ‘being confused’ is an assumption that I would not to make.
Who knows at this stage…the Poster may be more intelligent and less confused than we are.

Please let me say in closing…
I will take a ‘slap in the face’ without a blink and without a reply.
But if the ‘slap in the face’ is technically warranted then I will clean my act and respond.

Kind regards,
Chris.
 
The posts, by you and me, do not conflict
- If they don't conflict then why do you say that MY answer is incorrect? I assumed that the reference was external and needed to be so. My assumption may be wrong, but for the moment I'm sticking to it. If you have read any of my posts on the topic of references I always recommend the Me. syntax where appropriate if someone else hadn't already made the recommendation.
 
Pat.

For the moment, I will stick with you’re assumption, because I too think it is correct.

I did not say you were incorrect; I said under the specific circumstance of an internal reference and if the poster can… then you would be incorrect. Under those circumstances I think you would agree that if the Me.SomethingOrOther is available then that would be the preferred way to go. If you agree with that…then we agree.

For the past year or so I think I have read all you’re replies… you are the main reason I come to this site. And since I get a great deal of information that way, I try to return some, when I can.

It only seems fair to both give and take, although it does seem that I take more than I give. :)

Kind regards,
Chris.
 

Users who are viewing this thread

Back
Top Bottom