By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,275 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Problem Deleting record when Linked fields are empty

P: n/a
Hi,

I am a bit stumped with this. I have checked the archive but I can't
seem to find a problem like this. I have a form for entering a new
record. I am trying to envisage the user deciding to delete the record
part way through when some linked fields are not populated yet. When I
click the delete button I get an error message saying that there is no
corresponding entry in the linked table. I have enforced referential
integrety and tried selecting and unselecting "Casacade Delete related
Records". Any ideas

Thanks in advance,

John

Oct 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Macbane wrote:
Hi,

I am a bit stumped with this. I have checked the archive but I can't
seem to find a problem like this. I have a form for entering a new
record. I am trying to envisage the user deciding to delete the record
part way through when some linked fields are not populated yet. When I
click the delete button I get an error message saying that there is no
corresponding entry in the linked table. I have enforced referential
integrety and tried selecting and unselecting "Casacade Delete related
Records". Any ideas

Thanks in advance,

John
Are you attempting to delete a record that has not been saved yet? If
so, in your OnDelete event you might have some code like
if Not Me.NewRecord then
...any code you want
Else
Msgbox "You can't delete a new record that has not been saved. Press
the ESC key instead."
Cancel = True
Endif
Oct 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.