Re: Combination of fields must be unique



Amendment:

One of the problems of email db design is that the problem changes when more
info is supplied.

If you have a table detailing the Report (with a Primary Key of Report Name)
irrespective of the PDF Files then the following table will work:

Table: PDF Files
Field: PDF Filename (Primary Key)
Field: PDF Filetype (Report or Photo) probably best as a Yes/No field
Field: Report Name (Foreign Key to Report)

No need for table validation although you may wish to create a unique index
of the PDF Filename and PDF Filetype if you can only have one of each type
of PDF file for each Report.

Try to avoid pointless ID numbers if you have a perfectly good candidate for
Primary Key.

--
Slainte

Craig Alexander Morrison
"Seth" <Seth@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DA3384E4-DE03-469B-9DDB-021398C8655D@xxxxxxxxxxxxxxxx
> Jeff, I hope this explains it better:
>
> I am developing a database to keep track of test reports.
>
> All test reports are available as a hard copy.
> Some of these test reports are available as PDF.
> If a report is available as a PDF there could be two files Report and
> Photo
> attachment.
>
> I can't set the fields as required, as there is not always a PDF report.
> And
> if there is a PDF report there is not always a photo attachment.
>
> In my table I have two fields PdfReport and PdfPhotos.
> The user enters the path and file name using an open file dialogue box.
>
> I want to ensure that any file is only entered into the database only
> once,
> wether it is into PdfReport or PdfPhotos.
>
> Thanks for your help,
> Seth
>
>
> "Jeff Boyce" wrote:
>
>> Seth
>>
>> I'm not clear on your requirements...
>>
>> You want Field1 to be "unique", but no value must be entered. So, if in
>> a
>> couple rows you had no value entered in Field1, you'd have two rows with
>> Nulls in Field1 -- I don't believe these are unique.
>>
>> Ditto for Field2.
>>
>> And your comment:
>>
>> > But I am still able to enter the same value in both Field1 and Field2
>>
>> seems to imply that you also want to ensure that whatever is entered in
>> Field1 is never entered in Field2 for the same record.
>>
>> Perhaps if you explained a bit more about what you hope to accomplish
>> with
>> this arrangement, rather than how you are trying to do (something
>> undefined)...?
>>
>> Good luck
>>
>> Jeff Boyce
>> <Access MVP>
>>
>>


.



Relevant Pages

  • Re: Combination of fields must be unique
    ... assigned as the primary key. ... To relate the Report to the Photo you would need another field that would be ... Table: PDF Files ... PDF Filename Related Make this No Duplicates also ...
    (microsoft.public.access.tablesdbdesign)
  • Re: why>?
    ... Just because PDF is more popular than SNP; ... Emailing a dynamic report is easier than emailing PDF files.. ... Excel is ALWAYS less efficient than Access. ... e) multi-user functionality - being able to work on the same report / ...
    (microsoft.public.excel)
  • Re: Serviced Component : Architectural revival
    ... Q. Did you tried to wrote test of generating pdf by means of any other tools, ... Our client have Crystal Report license and they export it in Excel ... Placement of Dataacess layer to other machine. ... Can serviced components help us out under such circumstances? ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Combination of fields must be unique
    ... > If you have a table detailing the Report (with a Primary Key of Report ... > Table: PDF Files ... > Craig Alexander Morrison ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Create macro which automaticallly creates PDF of a report
    ... It will automatically convert a report into a pdf file. ... when the macro is executing. ... function that then runs the desired VBA code. ...
    (microsoft.public.access.reports)