[mso] Re: Access 2003 - table updates

OK. I've got it. In the subform (control properties):
 
Category - control source is Category_ID (the field in the junction  table)
Category - row source is "SELECT Category_Query.Category,  Category_Query.ID
FROM Category_Query;"
Category - bound column is 2 (corresponding to ID in the query)
 
Phew!
 
 
In a message dated 7/29/2008 8:57:57 P.M. Eastern Daylight Time,  
Pruscoe@xxxxxxx writes:
Further  to this, it seems likely that what I need to be doing is setting up  
 
the properties for the Category_ID in the subform correctly. But that is  
what  
has me baffled. I've tried every combination I can think of,  and it still  
doesn't work.

(And, by the way, Microsoft  apparently calls an associate table a "junction  
 
table.")


In a message dated 7/29/2008 2:34:25 P.M. Eastern  Daylight Time,  
Pruscoe@xxxxxxx writes:
You're  right Robert  - it is many-to-many - I misspoke. And I have, indeed,  
  
implemented it with an associate table called Picture_Category_Xref.   The  
table 
contains 3 fields: an AutoNumber ID (primary  key),  Product_ID and  
Category_ID. Referential integrity is  turned off for  both joins (and that  
automatically 
turns  off cascaded  updates/deletes anyway).

In the subform, I have left  the two foreign  keys (picture_id and  
category_id) visible for  debugging purposes.  And I'm finding that as soon  
as I select a  
category (it is a combo  box, driven by a query on the category   table), the 
category_id field  is populated with a NEW value (not the  one that  
corresponds 
to the  existing category record).  Then, when I save the master  record, I 
get a  
new associate  table record (as expected), and - not surprisingly   given the 
 
evidence - a new record in the category table too. That is  the   problem.

Peter


In a message dated 7/29/2008  2:13:25  P.M. Eastern Daylight Time,  
robert.tillotson@xxxxxxxxxxxxxx   writes:
What you  are describing is really a many to many   relationship.  Each
picture  can have many categories and  each  category can apply to  many
pictures.  This is  normally  implemented with two one to  many
relationships and an  associate  table.
Thus:
Many-to-many occurs  when both tables  contain records  that are related to
more than one record.   Access doesn't directly  support a many-to-many
relationship, so you  must  create a third  table: an "associate table." It
contains a  primary key and a  foreign  key to each of the data tables.
After  breaking down the  many-to-many  relationship, you have  two
one-to-many relationships between  the  associate table and  the two data
tables. 


If this is what   you really  have, then you should check the joins between
the tables  and   deselect the cascade updates and deletions (and probably
the   referential  integrity - since it won't make sense)  selections.

If  you have forced  some other arrangement, then  you might want  to
consider converting to this  standard  many-to-many  representation.

Robert   Tillotson
BAE-IT
Groton Field    Office
860-441-2207

-----Original Message-----
From:    mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf   Of  Pruscoe@xxxxxxx
Sent: Tuesday, July 29, 2008 1:34  PM
To:   mso@xxxxxxxxxxxxx
Subject: [mso] Access 2003 - table  updates

I   managed to solve the combo box problem by brute  force -  deleting   the
form, and recreating it using the  wizard. But now I've moved on   to
another issue.

The  design of my database includes a table  of  pictures and a table  of
categories. The picture/category  relationship is  one to  many. I
implemented this  by creating a  cross-ref table  that  contains a unique
ID, and pointers to the  picture and  category tables. The  form (that the
wizard created)  for   pictures including a subform for  categories
generally  works.  But when I add  a (picture) record with    related
categories, not only are records written  (correctly) to   the  picture and
cross-ref tables, but also to the category   table.  It  should not write
to the category table at   all.

I am at a loss to  know how to prevent this.   

Suggestions?


In a message dated  7/27/2008  9:31:22  P.M. Eastern Daylight Time,
Pruscoe@xxxxxxx  writes:
I  must   confess that as an infrequent creator of  Access databases   (and
forms)
I struggle a lot with what  seems to me to be arcane   terminology.

I  have created  a database including a main table  and  some subsidiary    
(lookup) tables. I have combo boxes  in the  form for the main  table,
which are  tied to the lookup  tables.  Although the  combo boxes display
the  values correctly  from the   subsidiary tables, when I select one it
is  not saved  in  the  form.  
Conversely, if I create a record in the   main  table  manually, when I
bring up  that record in  the  form, it does not   show the corresponding
value (from  the  subsidiary table) in the  combo  box.

I have made  this work  before, in a different database   (probably  after
hours of  head-scratching) and I've compared the    properties of  the
DB/form/field that work with the ones that  don't,   and I  can't see the
problem.

Any   suggestions?

Peter


**************Get fantasy  football   with  free live scoring. Sign up for 
FanHouse  Fantasy Football   today.       
(http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)


*************************************************************
You   are receiving this mail because you subscribed to   mso@xxxxxxxxxxxxx
or  MicrosoftOffice@xxxxxxxxxxxxxxxx

To  send  mail to the group,  simply  address it to   mso@xxxxxxxxxxxxx

To Unsubscribe from this  group, visit   the  group's homepage and use the
dropdown menu at the   top.  This  will  allow you to unsubscribe your
email  address or  change your  email settings to  digest or  vacation    (no
mail).
http://www.freelists.org/webpage/mso

To be able   to  share  files with the group, you must join our   Yahoo
sister  group.  This group  will not allow for  posting  of emails,  but
will allow you to 
join and  share  problem  files, templates,  etc.:     
http://tech.groups.yahoo.com/group/MicrosoftOffice .  This group  is  for
FILE  SHARING ONLY.

If you are using Outlook   and you  see a lot of unnecessary  code in your
email messages,  read   these instructions that explain why and how   to    
fix
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************




**************Get    fantasy football with free live scoring. Sign up for 
FanHouse   Fantasy  Football today.         
(http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)


*************************************************************
You    are receiving this mail because you subscribed to   mso@xxxxxxxxxxxxx
or  MicrosoftOffice@xxxxxxxxxxxxxxxx

To  send  mail to the group, simply  address it to  mso@xxxxxxxxxxxxx

To  Unsubscribe from this group, visit  the  group's homepage and use  the
dropdown menu at the top.  This  will  allow you to  unsubscribe your email
address or change your  email settings  to  digest or vacation (no    mail).
http://www.freelists.org/webpage/mso

To be able to   share  files with the group, you must join our Yahoo   sister
group.  This  group will not allow for posting of  emails,  but will allow
you to join and  share problem files,  templates,    etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group   is  for
FILE SHARING ONLY.

If you are using Outlook and you  see  a lot of  unnecessary code in your
email messages, read  these  instructions that  explain why and how to    fix
it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
*************************************************************
You    are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
  

MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the  group,  simply  address it to mso@xxxxxxxxxxxxx

To  Unsubscribe from this  group, visit  the group's homepage and use  the 
dropdown menu at the  top.  This will  allow you to  unsubscribe your email 
address 
or  change your email settings  to  digest or vacation (no    mail).
http://www.freelists.org/webpage/mso

To be able to   share  files with the group, you must join our Yahoo sister   
group.  This group  will not allow for posting of emails,  but  will allow 
you 
to 
join and share  problem files,  templates,  etc.:    
http://tech.groups.yahoo.com/group/MicrosoftOffice .  This group is  for FILE 
 
SHARING ONLY.

If you are using Outlook and  you  see a lot of unnecessary  code in your 
email 
messages, read  these  instructions that explain why and how  to fix    it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************




**************Get   fantasy football with free live scoring. Sign up for 
FanHouse  Fantasy  Football today.        
(http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)


*************************************************************
You   are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or  
 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group,  simply  address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this  group, visit  the group's homepage and use the 
dropdown menu at the  top.  This will  allow you to unsubscribe your email 
address 
or  change your email settings to  digest or vacation (no   mail).
http://www.freelists.org/webpage/mso

To be able to  share  files with the group, you must join our Yahoo sister  
group.  This group  will not allow for posting of emails, but  will allow you 
to 
join and share  problem files, templates,  etc.:   
http://tech.groups.yahoo.com/group/MicrosoftOffice .  This group is for FILE  
SHARING ONLY.

If you are using Outlook and  you see a lot of unnecessary  code in your 
email 
messages, read these  instructions that explain why and how  to fix   it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************




**************Get  fantasy football with free live scoring. Sign up for 
FanHouse Fantasy  Football today.       
(http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)


*************************************************************
You  are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or  
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply  address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit  the group's homepage and use the 
dropdown menu at the top.  This will  allow you to unsubscribe your email 
address 
or change your email settings to  digest or vacation (no  mail).
http://www.freelists.org/webpage/mso

To be able to share  files with the group, you must join our Yahoo sister 
group.  This group  will not allow for posting of emails, but will allow you to 
join and share  problem files, templates, etc.:   
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE  
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary  code in your email 
messages, read these instructions that explain why and how  to fix  it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************




**************Get fantasy football with free live scoring. Sign up for 
FanHouse Fantasy Football today.      
(http://www.fanhouse.com/fantasyaffair?ncid=aolspr00050000000020)


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: