Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 26th, 2006, 09:40 AM
Authorized User
 
Join Date: Apr 2006
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default Create a field in a query

Hi again,

My problem is that I have a query from table AAA where I have selected some fields to show me the criteria I want.This it is ok

The table AAA have an ID for any record!
There is a table BBB which has an ID for any record too!

Now, I want for the query with table AAA, to bring a field from table BBB without bring it into query for the records with the same ID

e.g.

TABLE AAA
ID Name Last Name
3 DFDG DSGDS

TABLE BBB
ID CITY STATE
3 HJHJ GGGG

I want:
QUERY
ID Name Last Name STATE
3 DFDG DSGDS GGGG

Just remember without bring the table BBB to the query!


Thank you all!

 
Old July 26th, 2006, 03:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

When you build the query with AAA, instead of bringing in the table BBB put this as the last field.

STATE: DLookUp("[STATE]", "BBB", "[ID] = " & [ID])

However, this will work slower than if you bring in table BBB and join it via ID.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a View "Name" field & Populate bren582 SQL Server 2005 2 February 11th, 2008 10:28 PM
Create Custom Field Property using ADOX BoGusman Pro VB Databases 2 July 13th, 2006 05:16 PM
How to create an aggregated field fdtoo SQL Server 2000 0 April 11th, 2006 08:40 PM
How to create a Calculated Field fdtoo SQL Server 2000 0 April 11th, 2006 08:34 PM
Create lookup based on field value s.hendy Access 2 May 20th, 2005 04:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.