Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access lookup

Status
Not open for further replies.

nilsar

IS-IT--Management
Jan 19, 2004
5
US
I created a lookup table with 3 entrys
1 2003
2 2004
3 2005

i then create a form for my main table
in the form i use a combo lookup to get the 3 entrys for year
problem i am having is when i look at my matrix table the field for the year is not the 2004 i am choosing it is a 2.
can anyone please tell me how i can use a table for lookups and have that value i select stored in my main table..
 
Hi,

You should be able to link the combo box to a field in the main table, by setting the control source.

not sure I understand your problem correctly, if I am wrong can you explain it little better.

Cheers

Nowell
 
ok let me try again

table year
-------------
| ID | Year|
-------------
| 1 | 2003|
-------------
| 2 | 2004|
-------------
| 3 | 2005|
-------------

i have a form using a table named matrix. the form is used to input users infomation but a repeated field is different years so i use a lookup combo box to solve that. problem begins when i look at the table matrix there is a 2 in the table not 2004 under year field coloum. and when i do a report it comes out as a 2. i have control source as year, row source type as table/query, and row source as SELECT Year.ID, Year.Year FROM [Year]; . what i would like is when i use a lookup from the form and select a value it puts that value not the index into my matrix.

thus when i do reports i will get correct year and not the index 2 number.

Thanks for assistance
 
An easy way to fix this is to get rid of the ID field. It serves no purpose. Just have the years and lock those down as the primary key. Then set your row source for the combo box to just be a select query of the years in the lookup table.

Hope this helps [ponytails2]
 
Thanks bud your fix worked like a charm thank you..
 
Hi,

Or setting the 'Bound column' property to 2 instead of 1 will do the same thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top