how to change number of fields per record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my database I have in the main table two fields for pictures, front and
back. The problem is sometimes I need three pictures, or five. How would I
set up a table to store these pictures if I don't know from record to record
how many pictures I will need to store?
 
Excellent question. Instead of going across with more pictures, you need
another table for the pictures related to your main table. You don't want
this:

HomeID, HomeName, PictureFront, PictureSide, PictureTop, and so on.

What you want is a Main table like:

HomeID, HomeName, HomeAddress ....
22 Davids 123 Main St

Then another table for Pictures:

PictureID, HomeID, PictureType, Picture
1 22 Front ----
1 22 Back xxxx
1 22 Side ////
and so on.

Then you join the two tables based on the HomeID field in a query.
 
How would I go about transfering an ID field from one form to the next (and
one table to the next). I have a field on my main form called CatalogID,
which is seperate from the index key. The CatalogID is set on each record
using DMax +1. I would want to use this ID on my subform that contains the
pictures, so how would I go about transfering this value from one form to the
next?
 
I'm assuming that CatalogID is the primary key in that table. If so create
the new table and link them together in the Relationship window with
referiential integrity enabled. Then when you create the subform, Access will
ensure that the child table is properly linked with new records.

You'll need to manually do it on existing records when splitting up the
tables.
 
Back
Top