Re: can we set a primary key on a form in access database if yes how?
- From: "David W. Fenton" <XXXusenet@xxxxxxxxxxxxxxxxxxx>
- Date: 12 Jun 2008 19:51:16 GMT
=?Utf-8?B?UGQ=?= <Pd@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:2573CDB2-D723-4BEE-A625-578644E11EC4@xxxxxxxxxxxxx:
Can someone tell me if there is a way to set primary key in form
view for access database, if yes how?
I'm not sure what you're question means, to be honest.
If you want a form to type in the value that will become the primary
key, you have to consider what you do when the user types in a value
that's already in use as a primary key.
My approach to this is to use a separate unbound form to collect the
data for the fields required to create a new record, and then check
to see if the resulting primary key already exists. If it does, you
tell the user and offer them some way around it. Once they've
entered data that won't create a collision, then you create the
record in DAO, and then load the new record in the main form for
them to fill out the other fields.
I have found this approach to be much more manageable than trying to
do the add in the same form as you do the edits.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.
- Prev by Date: Re: Form going blank - relationship problems
- Next by Date: RE: Set focus to label?
- Previous by thread: Re: can we set a primary key on a form in access database if yes how?
- Next by thread: RE: Password Form
- Index(es):
Relevant Pages
|