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

Query Imposing Field Name

Hi,

(Access 97)

I'm creating a query (QRY_SUMMARY) to join a query (QRY) to itself
(QRY_1). I'm returning QRY.* and selected fields from QRY_1. With each
field (field_name) I return from QRY_1 I'm appending "_1" to to the end
to avoid name conflicts with the fields from QRY, i.e. "field_name"
becomes "field_name_1".

It's all working fine, with one exception. ONE field from QRY is coming
through with the name "QRY.field_name" instead of just "field_name".
This is in spite of the fact that there IS no name conflict - the same
field from QRY_1 has been aliased as "field_name_1". (I have about 10
other fields, and they work with no problem.)

So far I've done the following (to no avail):
- recreated QRY_SUMMARY by cutting and pasting the SQL;
- compacted and repaired the database;
- checked that the original query has no naming conflicts;
- checked that there is no caption set on the source field.

(Additionally, I'm having trouble referring to the field
"QRY.field_name" in a subsequent formula in a report: it doesn't
understand "[QRY].[field_name]", "[QRY.field_name]" or
"[QRY_field_name]".)

Any ideas?

------------
LoopyNZ
------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
2 1827
Is there anything in the Caption property of the problem field in the table?

That can cause Access to display the Caption name instead of the actual
field name or alias from the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"LoopyNZ" <Lo*****@NOguruSPPAM.net.nz> wrote in message
news:41**********************@news.newsgroups.ws.. .

(Access 97)

I'm creating a query (QRY_SUMMARY) to join a query (QRY) to itself
(QRY_1). I'm returning QRY.* and selected fields from QRY_1. With each
field (field_name) I return from QRY_1 I'm appending "_1" to to the end
to avoid name conflicts with the fields from QRY, i.e. "field_name"
becomes "field_name_1".

It's all working fine, with one exception. ONE field from QRY is coming
through with the name "QRY.field_name" instead of just "field_name".
This is in spite of the fact that there IS no name conflict - the same
field from QRY_1 has been aliased as "field_name_1". (I have about 10
other fields, and they work with no problem.)

So far I've done the following (to no avail):
- recreated QRY_SUMMARY by cutting and pasting the SQL;
- compacted and repaired the database;
- checked that the original query has no naming conflicts;
- checked that there is no caption set on the source field.

(Additionally, I'm having trouble referring to the field
"QRY.field_name" in a subsequent formula in a report: it doesn't
understand "[QRY].[field_name]", "[QRY.field_name]" or
"[QRY_field_name]".)

Any ideas?

------------
LoopyNZ
------------

Nov 13 '05 #2
Thanks Allen, but I've been tripped up by that before, so I'd already
checked that and there aren't any captions set in the source table or
the source queries.

I think I'm going to have to do an ugly workaround in my report, i.e.
use a DLookup to retrieve the field, since I can't manage to refence it
properly.

------------
LoopyNZ
------------

--- QUOTED MESSAGE ---

Query Imposing Field Name
From: LoopyNZ
Date Posted: 11/4/2004 4:33:00 AM

Hi,

(Access 97)

I'm creating a query (QRY_SUMMARY) to join a query (QRY) to itself
(QRY_1). I'm returning QRY.* and selected fields from QRY_1. With each
field (field_name) I return from QRY_1 I'm appending "_1" to to the end
to avoid name conflicts with the fields from QRY, i.e. "field_name"
becomes "field_name_1".

It's all working fine, with one exception. ONE field from QRY is coming
through with the name "QRY.field_name" instead of just "field_name".
This is in spite of the fact that there IS no name conflict - the same
field from QRY_1 has been aliased as "field_name_1". (I have about 10
other fields, and they work with no problem.)

So far I've done the following (to no avail):
- recreated QRY_SUMMARY by cutting and pasting the SQL;
- compacted and repaired the database;
- checked that the original query has no naming conflicts;
- checked that there is no caption set on the source field.

(Additionally, I'm having trouble referring to the field
"QRY.field_name" in a subsequent formula in a report: it doesn't
understand "[QRY].[field_name]", "[QRY.field_name]" or
"[QRY_field_name]".)

Any ideas?

------------
LoopyNZ
------------
Re: Query Imposing Field Name
From: Allen Browne
Date Posted: 11/4/2004 4:53:00 AM

Is there anything in the Caption property of the problem field in the
table?

That can cause Access to display the Caption name instead of the actual
field name or alias from the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

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

Similar topics

10
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for...
13
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
4
by: Martin Lacoste | last post by:
(Access 2000) Two issues: Within a query, I need to return a field name as data (see eg. below). I need to search within 80 fields (same criteria) - is there a way to avoid 80 separate...
3
by: John Baker | last post by:
Hi: At the outset let me admit that I screwed up! I have built a rather elaborate set of forms and sub forms starting with a client table, and going down to PO and Line item. This works very...
3
by: GL | last post by:
Hi, Is there a way to add a field to an existing table using a query of some sort (without needing to manually add a field to the table). I know how to do it with a make table query, but I have...
7
by: rednexgfx_k | last post by:
All, Problem Summary: I've running about 30 make table queries via VBA in Access 2000, and my database goes from 14,000k to over 2,000,000k. In addition, the longer the procedure runs, the...
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
22
by: Stan | last post by:
I am working with Access 2003 on a computer running XP. I am new at using Access. I have a Db with a date field stored as mm/dd/yyyy. I need a Query that will prompt for the month, ie. 6 for...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.