471,337 Members | 1,041 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Want to update a junction table via forms page

I have created a junction table so that I can relate data from 2 other tables.

Table 1 - Category Table (has the following fields with data)
CatID (primary key)

Table 2 - Names Table (has the following fields with data)
NameID (primary key)

Table 3 - Junction Table (has the primary keys from Tables 1 & 2 - input manually)

If I update the Junction table manually it works but I want to be able to use Access Forms to select the CategoryName and the Names fields from the 2 tables and the application be able to save the primary keys in the junction tables.
Mar 13 '07 #1
1 3382
14,534 Expert Mod 8TB
Even though you have created a junction table the relationship between the two tables is still many to many and as such cannot be displayed on one form. You will need to create a main form and a subform.

For example ...

Main form based on the Category Table and subform based on the following query.
Expand|Select|Wrap|Line Numbers
  1. SELECT CatID, Names.NameID, Names, NamesStatus
  2. FROM Junction INNER JOIN Names 
  3. ON Junction.CatID=Names.CatID;
Mar 13 '07 #2

Post your reply

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

Similar topics

1 post views Thread by mksql | last post: by
2 posts views Thread by Joe Fetters via .NET 247 | last post: by
7 posts views Thread by gthompson | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.