Vlookup functionality in Access [ Lookup from other table]

S2Kool

New Member
Joined
Mar 17, 2016
Messages
7
Hi Team,

I have two table without any primary key.

Table1 : Week number , YEAR

Table 2: Week number, Month

how to add a query which can give me : Week number, Month and YEAR ( based on Table 1 & Table 2).

if its important to create the relationship first, then how to create a query which can add unique ID in table 1 and Table 2? currently data in table 1 and table 2 are straight coming from excel macro, hence I don't want to touch that table to create the ID's as primary Key.

appreciate your help.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
In your relationship, you would join the two tables on your Week Number field, since that is your common field.
Any unique ID field would be stored on the Table level, not the Query level.
For that, I would just recommend adding an Autonumber field to your table.

If you want to create a unique primary key field, maybe something that is a combination of weeknumber, year, and month, you would probably use a Make Table or Append Query, to write the records to a new table, where you can build a unique primary key field off of a combination of the weeknumber, year, and month fields.
 
Upvote 0

Forum statistics

Threads
1,221,816
Messages
6,162,148
Members
451,746
Latest member
samwalrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top