473,734 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2003 KEEPS changing my criteria in a list box

2 New Member
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
1 1910
nico5038
3,080 Recognized Expert Specialist
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("frmCompa ny")![CompanyID]

Nic;o)
Oct 6 '07 #2

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

Similar topics

14
5416
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB 7.2 environment, the choices the optimizer makes often seem flaky. But this last example really floored me. I was hoping someone could explain why I get worse response time when the optimizer uses two indexes, than when it uses one. Some context:
12
3381
by: Mike MacSween | last post by:
Sorry if this is a bit off topic, but I can't seem to find a 'remote control' newsgroup on my news server. And anyway I know Tony has some experience of this. The app is split FE/BE. I'd like remote access to at least the server, hopefully the whole network. And to be able to upload/download, to install new versions of the FE to the server (which then get sent up to the clients at runtime). What experience does anybody have of this....
3
1581
by: Taylor | last post by:
Good afternoon. I have recently converted an Access 97 application to Access 2003. The conversion went rather smoothly. However I am getting different results from the same exact query. I can debug.print the sql string and copy and paste it into 97 and 2003 query designer and get different results. I have seen the results come back the same if I edit the SQL in 2003 by adding a space or somethig but not changing the criteria.
6
4750
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
10
3344
by: Wayne Aprato | last post by:
I have a database that was written in Access 2003 using the Access 2000 file format. When I run the mdb in Access 2003 everything works fine. If I run it in Access 2000 the timer event won't fire on my forms. This is crazy. Has anyone seen this behaviour? Any help appreciated.
6
1243
by: Peter | last post by:
Hi, I have two simple classes called 'User' and 'Users', the entire code for both classes is shown below. ****======== User.cs ========**** public class User { private string _displayName, _email;
3
1595
by: AnandaSim | last post by:
Hi All, I'm experiencing what I think is a bug - can't figure out how it would be stated so difficult to search the NG. I have a form. It has four listboxes. Each listbox has a rowsource. The four listboxes cascade in criteria. So the next listbox in the sequence uses the formname!listboxX as the criteria for the rowsource. Not unusual.
3
3512
by: rhobson2 | last post by:
Hello, I wrote a database applicaiton using Access XP (2002) and everything has been working good for the client until they purchased a couple of new computers with Access 2003. The meetings form has an unbound combo box listing all the meetings in the database allowing the user to navigate between meeting records. The meetings form also has a list box that displays a list of members associated with a meeting.
2
2294
by: MNNovice | last post by:
I am working on a database on my CD collection using Access 2003. Some of the table structures are given below. Table 1 tblMusicCategory Field 1: MusicCategoryID - Auto Number (PK) Field 2: MusicCategory - text Field 3: MusicCategoryAbbv - text Table 2 tblArtists Field 1 ArtistID - Auto Number (PK)
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.