473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Access re-writes combobox row source query

I have a combobox on a form with the following row source SQL query.

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE (((tblSupplyType.SupplyName)=Forms![LoginInfo]!bxPWSName2));

After I close the form, Access rewrites the query to this:

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE
(((tblSupplyType.SupplyName)=Forms![AddSingleRecord]!bxPWSName2));

The change is in the WHERE clause. The correct form is discarded and
another form is substitued. Net result is the combobox does not get the
right recordset.

I can't figure out why Access is changing the query or how to stop it.
I'd appreciate any ideas.

Nov 13 '05 #1
4 1840
we*****@gru.com wrote:
I have a combobox on a form with the following row source SQL query.

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE (((tblSupplyType.SupplyName)=Forms![LoginInfo]!bxPWSName2));

After I close the form, Access rewrites the query to this:

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE
(((tblSupplyType.SupplyName)=Forms![AddSingleRecord]!bxPWSName2));

The change is in the WHERE clause. The correct form is discarded and
another form is substitued. Net result is the combobox does not get the
right recordset.

I can't figure out why Access is changing the query or how to stop it.
I'd appreciate any ideas.

Are you closing it when you are in error/debug mode. Open the form in
design mode when not in error and then modify the query, close the query
and then press the Save button off the toolbar before closeing the form.

If that doesn't work, create a query and substitute your select with the
query name.
Nov 13 '05 #2
we*****@gru.com wrote in
news:11**********************@g14g2000cwa.googlegr oups.com:
I have a combobox on a form with the following row source SQL
query.

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE
(((tblSupplyType.SupplyName)=Forms![LoginInfo]!bxPWSName2));

After I close the form, Access rewrites the query to this:

SELECT tblSupplyType.SupplyName, tblSupplyType.PWS_ID
FROM tblSupplyType
WHERE
(((tblSupplyType.SupplyName)=Forms![AddSingleRecord]!bxPWSName2
));

The change is in the WHERE clause. The correct form is
discarded and another form is substitued. Net result is the
combobox does not get the right recordset.

I can't figure out why Access is changing the query or how to
stop it. I'd appreciate any ideas.

Are you using a version of Access >= 2000, and have not disabled
the NameAutoCorrect b\u\g\Feature from the Tools>Options>General
menu?

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #3
Bob,

True in both cases, Access 2003 & perform name AutoCorrect = enabled.

Once I disabled the name AutoCorrect, Access quit rewriting my query.

Thanks x10!

Andrew

Nov 13 '05 #4
we*****@gru.com wrote in
news:11********************@g14g2000cwa.googlegrou ps.com:
Bob,

True in both cases, Access 2003 & perform name AutoCorrect =
enabled.

Once I disabled the name AutoCorrect, Access quit rewriting my
query.

Thanks x10!

Andrew

Somebody here refers to it as name AutoCorrupt. That person please
take a bow.

Glad to have helped.
--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
10
by: John Phelan | last post by:
I read an article by, by Mike Groh, in Access-VB-SQL Advisor Magazine, Week 37 that concerns me quite a bit on distributing Access Applications commercially. First I need to describe a "commercial...
1
by: Gary Dale | last post by:
I have a database that was originally set up in Access 97 (because that was what we had in the office). We had a copy of Access 2000 set up on one machine for a brief period to get at another...
9
by: Rob | last post by:
Scenario: O/S: Win XP Professional Back-end: Access 2002 on network server I have an Access 97 application, in production on our network, that takes appoximately 5 minutes to process monthly...
1
by: Matt Alanzo | last post by:
On another newsgroup an Access knowledgable party posted: >You should be able to connect an Access ADP to an existing SQLExpress >database running in SQLS 2000 compatibility mode. The only thing...
92
by: Jeffrey P via AccessMonster.com | last post by:
Our IT guys are on a vendetta against MS Access (and Lotus Notes but they've won that fight). What I can't understand is, what's the problem? Why does IT hate MS Access so much. I have tried...
37
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with...
0
ADezii
by: ADezii | last post by:
In Tip #12, we showed how to display a Progress Meter within Access by using the SysCmd() Function. By using this same Function, with different Action Arguments, we will now demonstrate how you can...
2
by: Dedalus | last post by:
If I want to retrieve a full version information for an ms access databases, I use (from vb6 code) the "Access.Application" object and SysCmd method. Whit the number returned by the method I can...
11
by: Harel | last post by:
I have a report SQL which have been working for a few weeks. Its large and the target database is large. It has 59 join, and I dont think there is anything I can do about this, since the DB I use...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.