A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Related record



 
 
Thread Tools Display Modes
  #1  
Old July 26th, 2008, 01:11 PM posted to microsoft.public.access.tablesdbdesign
Jose Lopes
external usenet poster
 
Posts: 21
Default Related record

I’m not experienced with database design so I’m calling for some help.

I have two tables one called RECORDS and another called IMAGES

RECORDS
- REC_ID (PK)
- DATE_
- MEMO

IMAGES
- IMG_ID (PK)
- IMG_REC_ID (indexed, with a relationship to REC_ID)
- IMG (OLE type)
- IMG_MEMO

This will be used to record accident situations and there will be a few
photographs taken for each situation. I was able to create a form to input
the RECORD data. Then I used the assistant to create a button that will open
a new form (IMAGES FORM) where I want to introduce the images for that
REC_ID. The problem is, after in copy paste my images in the form, when I try
to close it, ACCESS will say that a record is necessary in the RECORDS table…
I thought that the necessary record was already created while inputting data
in the RECORDS form… what am I doing wrong?

  #2  
Old July 26th, 2008, 01:44 PM posted to microsoft.public.access.tablesdbdesign
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Related record

Jose Lopes,
the tables look to be set up correctly for the relationship to work.
The message could be appearing because the images form has not opened to the
correct rec_id from the records table.
Very often people use a main form with sub form setup - because if you do it
this way, access makes sure that you only add images for a record selected
from your records table.
You would use a form based on Records for the main form and the subform
based on the table images.

The wizard can set up the main form and sub from for you.
You can then make changes to suit if you wish.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Jose Lopes" wrote in message
...
I'm not experienced with database design so I'm calling for some help.

I have two tables one called RECORDS and another called IMAGES

RECORDS
- REC_ID (PK)
- DATE_
- MEMO

IMAGES
- IMG_ID (PK)
- IMG_REC_ID (indexed, with a relationship to REC_ID)
- IMG (OLE type)
- IMG_MEMO

This will be used to record accident situations and there will be a few
photographs taken for each situation. I was able to create a form to input
the RECORD data. Then I used the assistant to create a button that will
open
a new form (IMAGES FORM) where I want to introduce the images for that
REC_ID. The problem is, after in copy paste my images in the form, when I
try
to close it, ACCESS will say that a record is necessary in the RECORDS
table.
I thought that the necessary record was already created while inputting
data
in the RECORDS form. what am I doing wrong?



  #3  
Old July 26th, 2008, 02:36 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default Related record

Jose

A more common approach would be to embed that second form inside the first
as a "subform", and to use the subform control's parent and child properties
to link the two together. That way, any subform record you add will be
added within the context of the main form record you are starting with.

Good luck!

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

"Jose Lopes" wrote in message
...
I’m not experienced with database design so I’m calling for some help.

I have two tables one called RECORDS and another called IMAGES

RECORDS
- REC_ID (PK)
- DATE_
- MEMO

IMAGES
- IMG_ID (PK)
- IMG_REC_ID (indexed, with a relationship to REC_ID)
- IMG (OLE type)
- IMG_MEMO

This will be used to record accident situations and there will be a few
photographs taken for each situation. I was able to create a form to input
the RECORD data. Then I used the assistant to create a button that will

open
a new form (IMAGES FORM) where I want to introduce the images for that
REC_ID. The problem is, after in copy paste my images in the form, when I

try
to close it, ACCESS will say that a record is necessary in the RECORDS

table…
I thought that the necessary record was already created while inputting

data
in the RECORDS form… what am I doing wrong?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.