By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,263 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,263 IT Pros & Developers. It's quick & easy.

Access 2003 KEEPS changing my criteria in a list box

P: 2
Hello

The problem is this: in the criteria for a list box I reference the
parent form - and Access KEEPS changing the criteria for one that
won't work. Details below:

I have a couple of list boxes on a form. In the row source I use the
primary key of the form as a criteria.

For example, I have company details on the form. The list box shows
staff from that company. Staff is a many to one relationship to company

So in my list box I have the CompanyID field and in the criteria for
this I have '[forms]![frmCompany]![CompanyID]

This all works fine. Until I close and reopen the form when I am
prompted for the criteria [forms]![form]![CompanyID].

If I look at the SQL for the list boxes Access is changing the
[frmCompany] to [form].

I have tried changing it back, saving the form, compact and repair but
it KEEPS changing my SQL back.

I am using Access 2003 SP3.

Anyone can help???
Oct 1 '07 #1
Share this Question
Share on Google+
1 Reply


nico5038
Expert 2.5K+
P: 3,072
Hello

The problem is this: in the criteria for a list box I reference the
parent form - and Access KEEPS changing the criteria for one that
won't work. Details below:

I have a couple of list boxes on a form. In the row source I use the
primary key of the form as a criteria.

For example, I have company details on the form. The list box shows
staff from that company. Staff is a many to one relationship to company

So in my list box I have the CompanyID field and in the criteria for
this I have '[forms]![frmCompany]![CompanyID]

This all works fine. Until I close and reopen the form when I am
prompted for the criteria [forms]![form]![CompanyID].

If I look at the SQL for the list boxes Access is changing the
[frmCompany] to [form].

I have tried changing it back, saving the form, compact and repair but
it KEEPS changing my SQL back.

I am using Access 2003 SP3.

Anyone can help???

Did you try to use:
forms("frmCompany")![CompanyID]

Nic;o)
Oct 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.