Re: unique record
From: tina (nospam_at_address.com)
Date: 05/21/04
- Next message: Steven K: "Send variables to a passthrough query"
- Previous message: Stephen Lebans: "Re: Using Background Images in a Form"
- In reply to: Elsie M: "Re: unique record"
- Next in thread: Elsie M: "Re: unique record"
- Reply: Elsie M: "Re: unique record"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 21 May 2004 20:59:16 GMT
yes, there are ways to validate the entries in all three fields as soon as
all three are entered, but i don't think i'd want to talk you thru writing
that code.
do any of the fields in your table have their Required property set to Yes?
if not, it might be easier to add a simple procedure (in the form, not the
table) to save the record when all three fields have been entered. then the
index rule would be enforced immediately.
"Elsie M" <emiller@fslf.org> wrote in message
news:uNyo3t2PEHA.624@TK2MSFTNGP11.phx.gbl...
> That worked great. Can you set it to warn you when you enter the last
item.
> Right now it does not tell you it is a duplicate until you try to save or
> move to the next record. Also would like to know how to customize the
> warning message . Thank you so much for you help
>
> "tina" <nospam@address.com> wrote in message
> news:qFsrc.12707$fF3.314790@bgtnsc05-news.ops.worldnet.att.net...
> > you can set up a unique index in the table. open the table in design
view,
> > and click on the Indexes button on the toolbar. there may be other
indexes
> > already listed, there certainly will be if you have a primary field in
the
> > table.
> > go to the first blank line in the Index Name column and enter a name,
like
> > SchemaEnvelopePhoto. in the next column FieldName, add the schema field
> from
> > the droplist; then go down to the Index Properties section and change
> Unique
> > to Yes.
> > go back up to the Field Name column, and in the next row *of the same
> > column* add the envelope field, and in the next row *again of the same
> > column* add the photo field.
> > now you have an index made up of three fields, and the combination of
the
> > three fields must always be unique, in each record in the table.
> > now you'll get an error message if you enter a duplicate-value record in
> the
> > form. it's a fairly ugly, user-unfriendly message. if you want to know
how
> > to substitute your own message, post back for details.
> >
> > hth
> >
> >
> > "Elsie M" <emiller@fslf.org> wrote in message
> > news:OOmUhS2PEHA.3220@TK2MSFTNGP09.phx.gbl...
> > > We have set up a photo database.In this database are fields for a
schema
> > > number, (which could be the same # on more then one picture), an
> envelope
> > > number of where the picture is located, and a photo number.
> > >
> > > Would like to set it up so if the same schema number, envelope number
> and
> > > photo number were entered, the inputter would get a message that this
is
> a
> > > duplicate record and would not allow it to be input.
> > >
> > > How can we accomplish this.
> > >
> > > Thanks for any help
> > > em
> > >
> > >
> >
> >
>
>
- Next message: Steven K: "Send variables to a passthrough query"
- Previous message: Stephen Lebans: "Re: Using Background Images in a Form"
- In reply to: Elsie M: "Re: unique record"
- Next in thread: Elsie M: "Re: unique record"
- Reply: Elsie M: "Re: unique record"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|