469,317 Members | 2,061 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

lookup tables / combo boxes

I created an access database using access 2003 with lookup tables and I am having isues where my combo boxes on the form update the lookup table instead of the master table.

I have a query to my inventory table and the relationships are done with the query. My form points to the query.

I am guessing that either my combo box isn't done correctly or my relationship isn't done correctly.

here is an example:
main table:tblInventory , has RC field
lookup table: tblRC , has id and RC
query: qryInventory, has RC from tblRC

relationship on query:
left table:tblInventory
left column name: RC
Right tablename:tblRC
right column name: ID
join type 2: Include all records from tblInventory and only those records from tblRC where the joined fields are equal

Form RC control properties:
control source: RC
row source type: Table/Query
Row source: SELECT tblRC.Id, tblRC.RC FROM tblRC;
Column count: 2
Column widths 0";1"
bound column 2

If needed I can send a copy of the database.

Thank you

Marc
Feb 1 '08 #1
1 2171
Lysander
344 Expert 100+
I created an access database using access 2003 with lookup tables and I am having isues where my combo boxes on the form update the lookup table instead of the master table.

I have a query to my inventory table and the relationships are done with the query. My form points to the query.

I am guessing that either my combo box isn't done correctly or my relationship isn't done correctly.

here is an example:
main table:tblInventory , has RC field
lookup table: tblRC , has id and RC
query: qryInventory, has RC from tblRC

relationship on query:
left table:tblInventory
left column name: RC
Right tablename:tblRC
right column name: ID
join type 2: Include all records from tblInventory and only those records from tblRC where the joined fields are equal

Form RC control properties:
control source: RC
row source type: Table/Query
Row source: SELECT tblRC.Id, tblRC.RC FROM tblRC;
Column count: 2
Column widths 0";1"
bound column 2

If needed I can send a copy of the database.

Thank you

Marc
Hi
I am assuming that id is a number, and RC in tblRC is text of some sort.

Then RC in tblInventory should also be a number as it should link to id in the lookup table. (I would have called in RCid)

If all that is true, the error is in your query qryInventory, having RC from the lookup table. You don't need this query, base your form on the main table. for the RC field, which actually holds the id number, use a combo box as you have done. The main table will hold the id number, the form will display the RC text (since the 1st column has width 0) and changing the combo box will cchange the value in the main table.
Feb 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by my-wings | last post: by
1 post views Thread by James | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.