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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Understanding Delete



 
 
Thread Tools Display Modes
  #1  
Old August 28th, 2006, 05:36 PM posted to microsoft.public.access.forms
ALEX
external usenet poster
 
Posts: 731
Default Understanding Delete

I have a table with 3 fields making up primary key. If someone clicks the
new record button and then decides they want to scroll to a previous record,
they get the 'Index or primary key cannot contain a null value' message. I
assume that's because in order to scroll to a previous message the one they
just created needs to be saved firt and one or more of the key fields is
null. Correct?

If, at that point then, a user decides they would like to delete the
incomplete record, they click Edit/Delete and still get the 'Index or primary
key cannot contain a null value message'. How can they delete a record that
doesn't have one of the primary key fields completed? Thanks.
  #2  
Old August 28th, 2006, 05:54 PM posted to microsoft.public.access.forms
Roger Carlson
external usenet poster
 
Posts: 222
Default Understanding Delete

They can't delete the record, because it hasn't been saved. They have to
UNDO the record or hit ESC key.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L


"Alex" wrote in message
...
I have a table with 3 fields making up primary key. If someone clicks the
new record button and then decides they want to scroll to a previous

record,
they get the 'Index or primary key cannot contain a null value' message.

I
assume that's because in order to scroll to a previous message the one

they
just created needs to be saved firt and one or more of the key fields is
null. Correct?

If, at that point then, a user decides they would like to delete the
incomplete record, they click Edit/Delete and still get the 'Index or

primary
key cannot contain a null value message'. How can they delete a record

that
doesn't have one of the primary key fields completed? Thanks.



  #3  
Old August 28th, 2006, 05:56 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Understanding Delete

Undo rather than Delete.

"Alex" wrote:

I have a table with 3 fields making up primary key. If someone clicks the
new record button and then decides they want to scroll to a previous record,
they get the 'Index or primary key cannot contain a null value' message. I
assume that's because in order to scroll to a previous message the one they
just created needs to be saved firt and one or more of the key fields is
null. Correct?

If, at that point then, a user decides they would like to delete the
incomplete record, they click Edit/Delete and still get the 'Index or primary
key cannot contain a null value message'. How can they delete a record that
doesn't have one of the primary key fields completed? Thanks.

  #4  
Old August 28th, 2006, 05:58 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Understanding Delete

Alex wrote:
I have a table with 3 fields making up primary key. If someone
clicks the new record button and then decides they want to scroll to
a previous record, they get the 'Index or primary key cannot contain
a null value' message. I assume that's because in order to scroll to
a previous message the one they just created needs to be saved firt
and one or more of the key fields is null. Correct?

If, at that point then, a user decides they would like to delete the
incomplete record, they click Edit/Delete and still get the 'Index or
primary key cannot contain a null value message'. How can they
delete a record that doesn't have one of the primary key fields
completed? Thanks.


You can't delete a recrd that was never saved in the first place. Have your
users press Escape a couple times when they want to "cancel" the record that
they started, but never saved.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #5  
Old August 28th, 2006, 06:44 PM posted to microsoft.public.access.forms
ALEX
external usenet poster
 
Posts: 731
Default Understanding Delete

All very helpful - thank you!

"Rick Brandt" wrote:

Alex wrote:
I have a table with 3 fields making up primary key. If someone
clicks the new record button and then decides they want to scroll to
a previous record, they get the 'Index or primary key cannot contain
a null value' message. I assume that's because in order to scroll to
a previous message the one they just created needs to be saved firt
and one or more of the key fields is null. Correct?

If, at that point then, a user decides they would like to delete the
incomplete record, they click Edit/Delete and still get the 'Index or
primary key cannot contain a null value message'. How can they
delete a record that doesn't have one of the primary key fields
completed? Thanks.


You can't delete a recrd that was never saved in the first place. Have your
users press Escape a couple times when they want to "cancel" the record that
they started, but never saved.


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



 




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 02:21 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.