#Deleted appears in dleted field before delete confirmation (1 Viewer)

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
Hello everyone, in my database below
Capture.JPG



I got "#deleted"appears in credit field (subform) when I try to delete levelID from tblYearLevel. However, it seems that the delete process done properly, so should I worry about it? if yes, then how to fix. Many thanks.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
you Requery the subform.
use the main form's AfterDelConfirm Event:

private sub form_afterdelconfirm(status as integer)
if status=0 then
' deketiin was confirmed
me. subformname. requery
end uf
end sub
 

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
you Requery the subform.
use the main form's AfterDelConfirm Event:

private sub form_afterdelconfirm(status as integer)
if status=0 then
' deketiin was confirmed
me. subformname. requery
end uf
end sub
Thank you for the replay. Actually, the "#deleted " appears before delete confirmation and disappear after the delete done, as i delete that filed of the subform form another subfrom that bound to tblYearLevel. So should I worry about ?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
i see, there us no issue then unless of course yiu cancel the delete, then the other subform is still showing #deleted.
try it. then it is best to still requery the ither subform.
 

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
i see, there us no issue then unless of course yiu cancel the delete, then the other subform is still showing #deleted.
try it. then it is best to still requery the ither subform.
When I cancel the deletion, the "#deleted" disappears too. :)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
then youre ok.
 

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
then youre ok.
Is it possible to change the field fore color at "Form_BeforeDelConfirm" to white color, so the the "#deleted" would be hidden and do not confuse the users ?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
does the subform has Master/Xhild Links?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
try breaking the link first, on the sub you are deleting:

private sub form_delete(cancel as integer)
me. parent!otherSub. LinkMastetFields="'
end sub

private sub form_afterdelconfirm(status as integer)
me.parent!othrSub.LinkMastetFields="othersub. Form.YearLevelID"
end sub
 

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
try breaking the link first, on the sub you are deleting:

private sub form_delete(cancel as integer)
me. parent!otherSub. LinkMastetFields="'
end sub

private sub form_afterdelconfirm(status as integer)
me.parent!othrSub.LinkMastetFields="othersub. Form.YearLevelID"
end sub
I am getting confused. Lets explain more. I have a from which is bound to tblAcadimicYears with two subfroms, the first one is bound to tblYearLevel and linked to the main form via YearID, and the second subfrom is bound to tblYearLevelCourseTeacher. The process of data entry in my form is :
Insert a year to the main from, then insert levels to the first subfrom, and finally, insert YearLevelID, CourseID,TeacherID and Credit to the second subfrom. That is about my from scheme. Now, when I delete a level, then a related records from the second subfrom should be deleted. Actually, the deletion process done with problem unless an annoying "#Deleted" appears in the credit field of the second subfrom before delete confirm message box, so when I click OK, the related records be deleted and the "#Deleted" disappears, also, when I click cancel, the operation be canceled and the "#Deleted" disappears too. I want for that "#Deleted" don't be shown ever at any time and any event.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:21
Joined
May 7, 2009
Messages
19,233
if you have Cascsde Delete on your relation, remove it and manually delete the related record on the second sub.
 

AlefAelol

Registered User.
Local time
Today, 10:21
Joined
May 21, 2014
Messages
75
if you have Cascsde Delete on your relation, remove it and manually delete the related record on the second sub.
Actually, even when I delete it manually there is no problem. For some reasons, I can't remove the Cascsde Delete. Anyway, should I worry about this issue ?
 

Users who are viewing this thread

Top Bottom