Trying to create query to do a lookup from another database.

soupi

Registered User.
Local time
Yesterday, 17:10
Joined
May 28, 2014
Messages
7
Hi Guys, I am trying to do a lookup from a field from one of my databases (DB1) onto another field in (DB2).... I have been using excel to do vlookups but a report that I do weekly I do atleast 7 lookups for the past weeks... So I am trying to find a way in access to do lookups and save those lookups each time i run the report...


Do I have to create the query and make the ID the primary key on both the databases and then create a relationship?

any help would be appreciated.
thank you....
 
So I am trying to find a way in access to do lookups and save those lookups

I know what you are saying, I know what I think you want, but I don't know if either of those 2 are what you actually want.

I think your issue can be solved by adding a linked table from the database you want to do your lookups on, then creating a query using that table. However, a concrete example of what you want would be helpful.
 
Thank you for your reply, what you have said is what i am looking for.... How would I do that? I'm fairly new to queries in access.
 
how would i create a query? would it have to know what the primary key is ?
 
You would use it in a query just like any table in your database. I have no understanding of the tables involved, so I can't guide you in building that query. If you want to post sample data from each table, then what resulting data you want I could possibly help then.

Use this format for posting data:

TableNameHere
Field1Name, Field2Name, Field3Name
David, 14, 2/4/2012
Larry, 36, 3/5/2009
Sally, 49, 5/2/2011
 
You would use it in a query just like any table in your database. I have no understanding of the tables involved, so I can't guide you in building that query. If you want to post sample data from each table, then what resulting data you want I could possibly help then.

Use this format for posting data:

TableNameHere
Field1Name, Field2Name, Field3Name
David, 14, 2/4/2012
Larry, 36, 3/5/2009
Sally, 49, 5/2/2011



This first table "SHEET1" is the file that I want to fill in from the lookup.. The ST and AFE coulmn would be my primary key.. I want to fill in the coulmn vBuild Status 3-4-18
1tu2h5.png





Now the 2nd table is the table that contains the lookup, "vbuild Status 3-4-14 which i want to use as a lookup table.
2a82nwo.png
 
Last edited:
Your use of jargon is not helping me figure out what you want. No more with the fancy database terms (primary key, lookup table, etc.). Also, you didn't provide me with what you wanted as a result from your query.

In your next post show me 3 sets of data: sample data from your first table, sample data from your second table, and then based on the sample data of those two, show me what resulting data should be produced by your query.

I'm also getting the feeling that this can be solved with a simple query with a simple join. I also advise you to check out this link that is a tutorial for simple queries:

http://office.microsoft.com/en-us/access-help/join-tables-and-queries-HA010096320.aspx
 

Users who are viewing this thread

Back
Top Bottom