Link to home
Start Free TrialLog in
Avatar of Tricia McKeating
Tricia McKeatingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Referencing controls within navigation forms

I am going crazy trying to find a way to reference a control within navigation forms

I have a two forms one called weekly lists and one called listbulk the list bulk form has a control on it called teach.

I have tried every connotation

[Forms]![weekly lists]![ListBulk].[Form].[teach]

I start with a form called menu I click a tab that opens another navigation form called weekly lists. On the weekly lists navigation form I click a tab  that opens a form called listbulk and I have a control on that form called teach.

driving me mad!

Tricia
Avatar of rspahitz
rspahitz
Flag of United States of America image

Have you tried just directly referencing the form?
First, make sure the form you want to reference is open (otherwise you'll need code to open it and show it.)
Next see if you see it in VBA by starting to type it's name then pressing the Ctrl+J key combination.  If it does not show up in the list, then the name may not be what you expect.
Avatar of Tricia McKeating

ASKER

I am sorry but I don't know how to do what you suggest as my VB knowledge is very poor.  I update data using an append query with this in the query

Teach: [Forms]![listbulk].[teach]

 where teach is a control on the listbulk form but as soon as I put this form within a navigation form it stops working

Tricia
No problem not knowing about VBA...can't be an expert in everything :)

It seems to me that you may be hitting a context problem, where the reference gets lost when you move it to the navigation form.

Did you create the navigation form or was it an Access wizard?  Since Access uses many different terms that sometime mean the same thing, I want to make sure we're referring to the same things.

Also, did you build this, [Forms]![listbulk].[teach], with the query builder?  You may want to try the same thing from the navigation form to link over to the form and get the control.  You may find that the reference is a bit different.
(I don't have Access on this machine so I can't try it at the moment.)
Oddly enough, I just had a very similar problem yesterday, and removing the prefixes solved the problem. (Of course, there was an appropriate reference and it used a lookup to the information needed.)

Have you tried replacing
[Forms]![weekly lists]![ListBulk].[Form].[teach]

with

[weekly lists]![ListBulk].[Form].[teach]

or something like that?
If that doesn't work, I''d use the query builder to try to re-build it.
Finally this worked

=[Forms]![Menu]![menu].[Form]![listbulk].[Form].[Teach]
I've requested that this question be closed as follows:

Accepted answer: 0 points for tmckeating's comment #a39941921

for the following reason:

Found the answer myself after trial and error
ASKER CERTIFIED SOLUTION
Avatar of rspahitz
rspahitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't understand the question
The question is how you came to your solution?  What process did you use to come up with that?