472,958 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

No confirm delete on first deletion from form

My application has a form based on a parent table with a subform based
on a child table. The relationship is Cascade Delete. The first
record displayed when the form opens has five child records. The form
allows this record to be deleted without a prompt, though SetWarnings
is set to True. When you try to delete other records, you do get a
prompt.

The problem isn't the relationship or the tables, because a test form/
subform using the same tables does prompt before deleting that first
record.

I've tried SaveAsText/LoadFromText on the form/subform to handle
corruption, but the results are the same.

1) Any suggestions on where to look in the forms for solutions?

2) How likely is it that the form(s) may still be corrupted? I've had
good results with SAT/LFT in the past. I saved as text, deleted teh
forms, then loaded from text (subform first) to the same database.

TIA

The environment is Win XP / A2003, both at SP2.

Nov 14 '07 #1
3 2386
ARC
Not sure why it wouldn't prompt, but it certainly should. You could place
code on the "Before Delete Confirm" event, such as:
dim resp as integer
resp = msgbox("Are you sure you wish to delete the curren
record?",vbYesNo+vbQuestion+vbDefaultButton2,"Dele te?")
if resp = vbNo then
cancel = -1
end if
<br********@comcast.netwrote in message
news:11**********************@v65g2000hsc.googlegr oups.com...
My application has a form based on a parent table with a subform based
on a child table. The relationship is Cascade Delete. The first
record displayed when the form opens has five child records. The form
allows this record to be deleted without a prompt, though SetWarnings
is set to True. When you try to delete other records, you do get a
prompt.

The problem isn't the relationship or the tables, because a test form/
subform using the same tables does prompt before deleting that first
record.

I've tried SaveAsText/LoadFromText on the form/subform to handle
corruption, but the results are the same.

1) Any suggestions on where to look in the forms for solutions?

2) How likely is it that the form(s) may still be corrupted? I've had
good results with SAT/LFT in the past. I saved as text, deleted teh
forms, then loaded from text (subform first) to the same database.

TIA

The environment is Win XP / A2003, both at SP2.
Nov 14 '07 #2
On Nov 14, 5:13 pm, "ARC" <PCES...@PCESoft.invalidwrote:
Not sure why it wouldn't prompt, but it certainly should. You could place
code on the "Before Delete Confirm" event, such as:

dim resp as integer
resp = msgbox("Are you sure you wish to delete the curren
record?",vbYesNo+vbQuestion+vbDefaultButton2,"Dele te?")
if resp = vbNo then
cancel = -1
end if

<brucedo...@comcast.netwrote in message

news:11**********************@v65g2000hsc.googlegr oups.com...
My application has a form based on a parent table with a subform based
on a child table. The relationship is Cascade Delete. The first
record displayed when the form opens has five child records. The form
allows this record to be deleted without a prompt, though SetWarnings
is set to True. When you try to delete other records, you do get a
prompt.
The problem isn't the relationship or the tables, because a test form/
subform using the same tables does prompt before deleting that first
record.
I've tried SaveAsText/LoadFromText on the form/subform to handle
corruption, but the results are the same.
1) Any suggestions on where to look in the forms for solutions?
2) How likely is it that the form(s) may still be corrupted? I've had
good results with SAT/LFT in the past. I saved as text, deleted teh
forms, then loaded from text (subform first) to the same database.
TIA
The environment is Win XP / A2003, both at SP2.
BeforeDeleteConfirm doesn't fire for this record.

Nov 14 '07 #3
On Nov 14, 4:26 pm, brucedo...@comcast.net wrote:
My application has a form based on a parent table with a subform based
on a child table. The relationship is Cascade Delete. The first
record displayed when the form opens has five child records. The form
allows this record to be deleted without a prompt, though SetWarnings
is set to True. When you try to delete other records, you do get a
prompt.

The problem isn't the relationship or the tables, because a test form/
subform using the same tables does prompt before deleting that first
record.

I've tried SaveAsText/LoadFromText on the form/subform to handle
corruption, but the results are the same.

1) Any suggestions on where to look in the forms for solutions?

2) How likely is it that the form(s) may still be corrupted? I've had
good results with SAT/LFT in the past. I saved as text, deleted teh
forms, then loaded from text (subform first) to the same database.

TIA

The environment is Win XP / A2003, both at SP2.
I found that when I made a copy of the database, deleted the first
record and its related records from it, then appended the same records
from the original, the problem went away. I don't know why this
worked. I'm still a little concerned about corruption. Any further
suggestions would be appreciated.
Nov 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: neoconwannabe | last post by:
Hi, I have an html form with a number of checkboxes that can be checked to delete items. I want to have a javascript alert prompt box to pop up to confirm the delete. I am building my site with...
5
by: Squirrel | last post by:
I have an Access 2002 db and via Tools->Options->EditFind have checked the checkboxes for Confirm Document Deletions and Confirm Action Queries but get no confirmation prompt when I e.g. delete a...
7
by: TJS | last post by:
javascript "confirm" fires after deletion instead of before deletion. how do I get this to stop the processing ? code ================== Sub ShowAlert(ByVal s As string)...
2
by: R.Welz | last post by:
Hello. I want to discuss a problem I have with my database design becourse I feel I cannot decide wheather I am on the right way of doing things. First of all, I am writing a literature and...
7
by: morz | last post by:
i just search for a while in c++ groups but cannot find good answer. i have code like this: int **ptr; ptr = new char *; ptr = new int(5); ptr = new int(16);
5
by: rn5a | last post by:
The .NET 2.0 documentation states the following: When using a DataSet or DataTable in conjunction with a DataAdapter & a relational data source, use the Delete method of the DataRow to remove...
4
by: mamun | last post by:
Hi All, I have the following situation and am looking for answer in C#. I have a datagrid and putting checkbox next to each record. In the header I have a Delete button. I want users to...
2
by: RN1 | last post by:
I have a DataList which displays the first & last name of users as links (LinkButtons). When the links are clicked, 2 textboxes appear - one with the first name & the other with the last name - for...
31
by: matthewslyman | last post by:
I have an unusual design and some very unusual issues with my code... I have forced Access to cooperate on everything except one issue - record deletion. My form design involves a recursively...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.