Solved

List box row source query not picking up form reference

Posted on 2006-11-28
3
245 Views
Last Modified: 2010-05-18
Hi

I have a list box on a sub form.  The criteria for the row source query of the list box is set to the value of another control on the sub form as follows:

[Forms]![frmCompanies]![chdAddresses]![txtCompanyAddress_ID]

The problem is that no values are being displayed in the list box when they should be.  I have checked all the obvious.  If I substitute the above for an actual value then it works fine.  I have had this problem before but never been able to solve it - I have used the identical setup in other dbs and it has worked fine.  I can only conclude it is some sort of bug.

I am using Access 2003 on XP Pro

Any ideas??

Many thanks

Ken
0
Comment
Question by:kenabbott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
Natchiket earned 500 total points
ID: 18026506
It may the way you are formulating the reference to the field

[Forms]![frmCompanies]![chdAddresses]![txtCompanyAddress_ID]

try

[Forms]![frmCompanies]![chdAddresses].Form![txtCompanyAddress_ID]

Where chdAddresses is the name of the subform on frmCompanies and txtCompanyAddress_ID is the name of the field within the subform
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 18026773
" I have checked all the obvious."

sorry to repeat, but have you checed the list control format to ensure that its column widths are not set 0cm;2.54cm...

effectively hiding the 1st columns.

that always catches me if i use the wizard to create the control, and  it autohides the key column and then i later chang emy mind about the number and order of columns.
0
 

Author Comment

by:kenabbott
ID: 18026794
Fixed!  Adding the .Form! before the control name did the trick.  many thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question