Delete Table Confirmation
Aug 2, 2005is there any way to get rid of deletion confirmation when you run a make-table query. though I unchecked all boxes under Confirm on Edit/Find tab, still popping up.
thanks in advance
is there any way to get rid of deletion confirmation when you run a make-table query. though I unchecked all boxes under Confirm on Edit/Find tab, still popping up.
thanks in advance
I am trying to create a button to delete record, I have used the wizard and it works fine but now I want to have a confiirmation message to confirm that they really want to delete this record.
below is my code. The prompt works but the record never deletes.
Any Idea's
Private Sub cmdDeleteRec_Click()
On Error GoTo Err_cmdDeleteRec_Click
DoCmd.SetWarnings False
If MsgBox("Are you sure you want to delete this record?", vbYesNo, "Warning.........") = vbYes Then
Me!frm_Entry.SetFocus
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Else
DoCmd.SetWarnings True
End If
Exit_cmdDeleteRec_Click:
Exit Sub
Err_cmdDeleteRec_Click:
MsgBoxErr.Description , vbExclamation, "Error #" & Err.Number
Resume Exit_cmdDeleteRec_Click
End Sub
:confused: :confused:
I'm wondering if its possible to have a "would you like to save changes, yes/no" thing pop up after data has been added or changed to a form, or have the option to save when closing a form and if no is chosen then any data changed is not saved.
View 5 Replies View RelatedWhen i try to insert data into a backend Oracle table (with ODBC) using a form, (i use docmd.runsql "insert....") Access gives me a message like"You are trying to append 1 row to the table are you sure you want to append?"
i want to suppress this message as i have to insert into 2 tables and delete from 3 tables when the user enters some data in the form, so it asks the user five times (say 2 times for insert and 3 times for delete..) when it inserts or deletes each table. the user doesnt want this to click every time when they do that...
how do i suppress these messages, is it Access-specific or oracle specific?
I am not able to do this..!
is this any kind of exception that i have to put in??
Thanks for all ur help!!
My training table consist of 3 fields and using unbound form
1st field custid (text field)
This can't be NIL or Can't duplicate
What I am looking for learning point of view (duel check at same field with different behaviour).If record is duplicate "Popup message" and curser move back to same field.If field is empty "popup message" Do you want to continue, If yes, move back to field if NO, close form..Therefore, on Before Update event I wrote the following.
Private sub txtcid_beforeupdate (cancel as Integer)
If Dcount("[custid]", "[customerdetails]", "[custid]='" & me.txtcid & "'") > 0 Then
MsgBox "Customer ID already Exists !!!!"
Cancel = True
Me.Txtcid.Undo
[code]....
Just a quick update "I tried to used YES or NO option in Exit event too, but no success.
I have a form and I have created an event procedure on the "before update" property of the form. My procedure is:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim pwd As String
pwd = InputBox("Is the information you entered correct?")
If pwd <> "yes" Then
MsgBox "Record Not Saved"
Me.Undo
Else
MsgBox "Record Saved"
End If
End Sub
the record is not saving under any situation. What do I have wrong?
Hi,
Is there any way to customize append query confirmation message? Unclicking Confirm Tools-->Options-->Edit/Find-->Confirm-Action Queries disables all warning messages.
My query takes some records from one table and append them to another table. When I run the query, first warning message says "Warning you r about to run an append query that will modify data in your table" (this is the message I do not want to see) and then if OK is clicked, the message says "you are about to append XXX rows...(this is the message I would like to customize)
How can I customize the 2nd message?
regards
Hi all,
I am building a simple db from scratch using the limited knowledge i have, and a lot of the information gained from searching these forums as a guest. I've now reached a point where I can't seem to find what I'm looking for, so any help would be gratefully received!!
I have a single table, single form and single report (told you it was simple;)). The table has nearly 2000 records and 2000 pictures (linked). On the form I can print every record with a single click of a command button. This is great, but I would like a message box to popup and confirm the print action, as this is gonna be expensive if its clicked on every record!!
If anybody can help, I would be chuffed!! I searched the forums and can't seem to find anything on this!!
j
Before my registration form is submitted i have created a message box saying "would you like to submit?"
but it pops up as if it were to be an error message.. i will attach my coding and the pop up ..
I am designing a transactions database for some of my clerical staff. I've inserted a data entry subform into the main transactions form (which also has a subform that summarizes all the selected company's past transactions). This data entry subform actually has as it's record source a table that simply stores that one record temporarily.
So when the user is finished entering their current transaction, I have a Save button that actually just opens a popup form which displays the data they entered into the data entry subform, giving them a chance to verify their entry is accurate. This form has a Save button which runs an append query and a delete query, adding the record to the permanent Transacations table and also clearing the temp table.
The problem I have, I think, is that when the popup form opens, the main form data entry subform still has that record locked as exclusive. I believe this is the case because while I am indeed able to make changes to the fields on the popup form, none of these changes appear in the temp table. In other words, the user is not actually able to use the confirmation pop up form to make any necessary edits to their entry. This makes the form sort of useless!
I have a database that logs complaints. I've added a field to calculate the age of a complaint based on the date received and the date resloved. To update this field I have an update query that runs after someone closes an update form. My problem is that I recieve two dialog boxes one that confirms that I'm will be updating the table and another that tells me how many rows were updated. I would not like those boxes to appear so the update would look transparent.
View 1 Replies View RelatedI have a form with a sub form. when a record is choosen in a combo box the sub form is filled out with a record.
what I am trying to do is have a button that will copy that record to a history table then delete it off the the main table.
I cheated by using the wizard to get the code to delete the record but I am having troubles modifying the code to copy that record to the history table. Here is the code below. I have tried to insert code in several places but it just errors out.
'------------------------------------------------------------
' Master_tbl_sub_fm
'
'------------------------------------------------------------
Function Master_tbl_sub_fm()
On Error GoTo Master_tbl_sub_fm_Err
With CodeContextObject
On Error Resume Next
[Code] ....
i have two data tables, one is depending on the other. now i need to delete the main table row depending on the subtable row if it is null.
View 3 Replies View RelatedA SELECT works:
SELECT *
from mastertable
INNER JOIN secondarytable
ON mastertable.Identicalfield = secondarytable.Identicalfield
But none of these do:
DELETE
FROM mastertable
INNER JOIN secondarytable
ON mastertable.Identicalfield = secondarytable.Identicalfield
**Incorrect syntax near the keyword 'INNER'.**
DELETE
FROM mastertable JOIN secondarytable
ON (mastertable.Identicalfield = secondarytable.Identicalfield)
**Incorrect syntax near the keyword 'JOIN'.**
DELETE
FROM mastertable
WHERE (mastertable.Identicalfield = secondarytable.Identicalfield)
**The column prefix 'secondarytable' does not match with a table name or alias name used in the query.**
DELETE
FROM mastertable
WHERE IN (SELECT *
FROM secondarytable)
**Incorrect syntax near the keyword 'IN'.**
Can anyone help? This should be easy, shouldn't it?!
Thank you.
I have a table which lists amendments (amendments history file) which need to take effect of another table (M0070), I can select the records fine and so the sub query looks to be okay but I'm missing something (probably obvious) in the deletion query where by it does only delete the records selected but everything (I know that the asterisk is wrong in the code below but I'm not sure what to replace it with).
At this point I'm trying to delete all records for a specific employee on a specific contract (they can be 1 or more employee records for that individual on a contract - and they could exist on multiple contracts).
DELETE *
FROM M0070
WHERE EXISTS
(SELECT M0070.[Contract No], M0070.[Contract Name], M0070.[Employee No], M0070.Forename, M0070.Surname, M0070.Branch, M0070.[Long Desc], M0070.[Emp Post Start Date], M0070.[Days per week],
[Code] .....
I have an employee and asset database. If an employee gets fired, I need remove them from the general employee records, but I want to save a record of that employee. Is there a way to delete an employee from one table and have it automatically added to another table?
View 4 Replies View RelatedWell I have two tables, one is the workorder register and the other is the closed work orders. This is for maintenance. I have a form for creating and veiwing workorders. I need to link a command button to the form that will delete the record being viewed in the WO REG table and paste it in the Closed WO table. I think I need to use two append queries but have no idea what I am doing. Here is what I have so far.
INSERT INTO [CLOSED WO] ( WO, MMCN, TECH, NOMIN, FUALTS, TYPE, [SECTION], CLOSEDATE, OPENDATE )
SELECT [WO REG].[WO], [WO REG].[MMCN], [WO REG].[TECH], [WO REG].[NOMIN], [WO REG].[FUALTS], [WO REG].[TYPE], [WO REG].[SECTION], [WO REG].[CLOSEDATE], [WO REG].[OPENDATE]
FROM [CLOSED WO], [EQUIP REG] INNER JOIN [WO REG] ON [EQUIP REG].[MMCN]=[WO REG].[MMCN]
WHERE ((([WO REG].[WO])=[WHAT WO TO CLOSE?]));
Like I said I have no idea what I am doing, this is out of the SQL view for my "move to closed WO" query. the fields I need to move are WO, MMCN, TECH, NOMIN, FUALTS, TYPE, SECTION, CLOSEDATE, and OPENDATE.
Is this even remotly right? I know nothing of VBA an all these symbols mean nothing to me.
I need urgent help, I am required at my job to come up with a command that will check to see if a table exists, and if so, delete the table. The whole process goes like this:
There's a form, and a listbox. 2 buttons...1 is import a file and 2nd is generate report. In the listbox theres 3 excel files. You select one excel file then click on Import, followed by clicking on Generate Report button.
The whole technical process is this:
1. A csv file is imported into a temp table
2. A temp table is created and named "_ImportedSKUS".
3. An append query is exectued to add the data from the "_ImportedSKUS" temp table to the final table, "Imported SKUs".
4. Then the temp table, "_ImportedSKUs" is closed and deleted.
I have a delete command at the end of the sub, which goes like this:
DoCmd.DeleteObject acTable, "_ImportedSKUS".
But I'm also need to generate an If statement before the loop that will check to see if the "_ImportedSKUs" table exists, if so, delete it (using same code listed above) and end if.
Can anyone help me out here???
little question here:
1) table deleting
i have a table in which temporary data is stored;
With a command button i want to delete the table (or maybe just the data in it);
2) information from table in textbox
In a form i have a textbox in which the data is mentioned from the table, after clicking the delete table button, i want also the texbox to be empty
First i tried to put the following code behind the onclick event but doesn't seem to work(?)
DoCmd.DeleteObject acTable, tTable
It should be quite simple (i think?); please advise,
Thanks
if I had tblOrders OrderNo, CustomerNo, Date, OrderTotal
tblCustomers CustomerNo, Name, Street, Country, Postcode
and I was asked to delete orders placed by customer Smith, would I be correct if I put this:
DELETE tblOrders*
FROM tblOrders INNER JOIN tblCustomers ON tblOrders.CustomerNo = tblCustomers.CustomerNo
WHERE Name = "Smith"
I wasnt sure about the DELETE tblOrders to have a '*' after it or not . .
Hi,
Is it possible to delete a record from a table whilst viewing that table through a form. The awkward part though is because I have another table linked to it.
Basically the main table is Orders and the other table is Items (these items make up an order). So when I go to simply click on delete an error message appears saying that I cannot delete the record but there are records attached to it in another table. This is fair enough but is there a smooth way off deleting off the items?
Many thanks,
Paul.
Hi
Is there a automatic way i can delete Fields from a Table? This table gets input into the database very frequently as updates come in and i'd like something like a Query or Macro, where i can define which fields i dont want, to delete the 30+ columns of useless data.
Can't see how to do it with a Query or macro though
Anyone have any ideas?
Thanks
Hi all, whats the simplest way to delete the last record in a table? based on
DoCmd.RunSQL "DELETE * FROM
Trying to use a button to do the above
Cheers
Hi
I'm trying to deleterecords from one table. In the query there are 2 tables both joined. I get an error message come on saying
"Specify The Table Containing The Records you want to Delete"
Below is the query in SQL
DELETE tblStockRequired.StockCode, tblStockRequired.StockQTY, tblStockRequired.OrderNumber
FROM tblOrderCompleted INNER JOIN tblStockRequired ON (tblOrderCompleted.OrderNumber = tblStockRequired.OrderNumber) AND (tblOrderCompleted.StockCode = tblStockRequired.StockCode) AND (tblOrderCompleted.QTY = tblStockRequired.StockQTY);
I want ot delete all records from tblStockRequired which match up with tblOrderCompleted.
Thanks in Advanced
Hi all.
I kind of got stuck with this one.
I'm trying to use a Delete query to delete some records from Table A.
Let's say Table A has three fields: A1, A2 and A3
Then there's another table, Table B, with two fields: B1 and B2
Within one Delete Query, i need to delete all the records from Table A for which: A1=B1
Thanks for your help.
Alex
Hi.
How I can delete all rows from my table whit on query? Also I want that when I delete rows from my table index and other settings will stay in table.