473,404 Members | 2,137 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,404 software developers and data experts.

MS Access 2002 problem: linked form fields in ODBC queries

Ok, my problem is the following:

I have very complicated Access 97 databases that link through ODBC to
Sybase databases.

Now in some of the forms controls I had queries that used as "where
clause" parameters form field values; For example:

select foo from bar where a_colmun = [forms]![MyForm]![MyField]

This worked in Access 97 but fails in Access 2002 (ODBC failure) when
the table *bar* is an ODBC Sybase (in my case) linked table.

If *bar* were a local Access table, the query would do fine.

if i did

select foo from bar where a_colmun = (select
[forms]![MyForm]![MyField] from dual)

where *dual* is a table with only one line of data. That works, but it
slows my queries.

Someone have a solution ? (i cannot upgrade to newer versions of
Access)

Thanx in advance

Jan 9 '06 #1
2 1962
Per mo************@yahoo.com.ar:
Now in some of the forms controls I had queries that used as "where
clause" parameters form field values; For example:

select foo from bar where a_colmun = [forms]![MyForm]![MyField]

This worked in Access 97 but fails in Access 2002 (ODBC failure) when
the table *bar* is an ODBC Sybase (in my case) linked table.

If *bar* were a local Access table, the query would do fine.


Is the SQL in the form's .RecordSource or are you applying it from VBA code?

If it's in .RecordSource, you can probably stop here and move on the next
post...

I've had slightly similar problems when VBS uses a query that refers to a form's
control value. Query works find when invokes by double clicking the query
object, but can't find the referenced control when invoked from VBA.

Workaround for me was to define a parameter in the query and explicitly load it
in VBA before opening an RS.
--
PeteCresswell
Jan 9 '06 #2
PeteCresswell
Is the SQL in the form's .RecordSource or are you applying it from VBA code?


It is in the a list's record source in fact.

The IT services suggested to put back the Access 97 Sybase's patch :)

The only solution i found is the one i posted above, an innner select
using the form's field value with a local table (dual, a one-line
oracle-like table i defined)

Jan 10 '06 #3

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

Similar topics

3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
0
by: LesM | last post by:
This is a change of behaviour between Access 2000 SP3 and Access 2002 SP3. I have Progress table that is linked via ODBC into Access using OpenLink Lite for Progress 9.0b. For over a year, using...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
4
by: Vanessa | last post by:
Hi there I am an Access developer, and I have written applications for a 30 telephone call center, using the standard multiuser jet engine, it all works fine, but I want to move our systems onto...
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
1
by: sdavis1970 | last post by:
I am working on an Access 2002 database where one of the tables has five required fields making up the key. There is a form that is linked to this table which is used for adding new records. ...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.