Hello all,
I have made a form with a button to delete the current record.
When clicking the button, I get a errmsg "Reserved error" I don't know what
this means. And even though I have put "Me!Combo39.Requery" instruction,
after deleting - the combobox still shows the name of the deleted person.
Furthermore, when closing the form and reopening again, it shows that the
record was not deleted ...
Can anybody help me with this? The coed is below ...
Very much appreciated ...
Private Sub Command54_Click()
On Error GoTo Err_Command54_Click
If MsgBox("Wil u werkelijk dit contact wissen?", _
vbQuestion + vbYesNo, "Please confirm...") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Me!Combo39.Requery
Me!Combo41.Requery
Form.Requery
End If
Exit_Command54_Click:
Exit Sub
Err_Command54_Click:
MsgBox Err.Description
Resume Exit_Command54_Click
End Sub 2 1851
Ronny, Probably the reason the record the record continues to show is
because when you get the error the record isn't getting deleted. I pasted
your code in a form and it ran without any problem. Is it possible that the
recordsource of your form is a non-updatable recordset. In other words can
you open the source directly via the table or query that the form is based
on and delete a record?
--
Reggie
----------
"Ronny Sigo" <roon ad skynet.be> wrote in message
news:41**********************@news.skynet.be... Hello all, I have made a form with a button to delete the current record. When clicking the button, I get a errmsg "Reserved error" I don't know
what this means. And even though I have put "Me!Combo39.Requery" instruction, after deleting - the combobox still shows the name of the deleted person. Furthermore, when closing the form and reopening again, it shows that the record was not deleted ...
Can anybody help me with this? The coed is below ... Very much appreciated ...
Private Sub Command54_Click() On Error GoTo Err_Command54_Click If MsgBox("Wil u werkelijk dit contact wissen?", _ vbQuestion + vbYesNo, "Please confirm...") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Me!Combo39.Requery Me!Combo41.Requery Form.Requery End If Exit_Command54_Click: Exit Sub
Err_Command54_Click: MsgBox Err.Description Resume Exit_Command54_Click
End Sub
Hi Reggie,
Thanks for replying ...
Yes I can delete a record via a query or directly in the table ....
Greetz ...
"Reggie" <No**********@NoSpamsmittysinet.com> schreef in bericht
news:lv********************@comcast.com... Ronny, Probably the reason the record the record continues to show is because when you get the error the record isn't getting deleted. I pasted your code in a form and it ran without any problem. Is it possible that
the recordsource of your form is a non-updatable recordset. In other words
can you open the source directly via the table or query that the form is based on and delete a record? -- Reggie
---------- "Ronny Sigo" <roon ad skynet.be> wrote in message news:41**********************@news.skynet.be... Hello all, I have made a form with a button to delete the current record. When clicking the button, I get a errmsg "Reserved error" I don't know what this means. And even though I have put "Me!Combo39.Requery" instruction, after deleting - the combobox still shows the name of the deleted
person. Furthermore, when closing the form and reopening again, it shows that
the record was not deleted ...
Can anybody help me with this? The coed is below ... Very much appreciated ...
Private Sub Command54_Click() On Error GoTo Err_Command54_Click If MsgBox("Wil u werkelijk dit contact wissen?", _ vbQuestion + vbYesNo, "Please confirm...") = vbYes Then
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Me!Combo39.Requery Me!Combo41.Requery Form.Requery End If Exit_Command54_Click: Exit Sub
Err_Command54_Click: MsgBox Err.Description Resume Exit_Command54_Click
End Sub
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matthew Cascio |
last post by:
My understanding is that using reserved words as column names is
allowable as long as they are quoted. I am trying to create a table
dynamically with columns defined by the first row of a text...
|
by: Jessard |
last post by:
Hi All,
I am writing a .NET app that accesses an access View. The view has a table
column called 'Position'. When i try and right an UpdateCommand string for
this using this column I am...
|
by: Benoit Martin |
last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database
that I can't modify
I created a dataset with a schema identical to the DB.
When trying to update the DB from the dataset...
|
by: Roman Werpachowski |
last post by:
The following code does not compile:
#include <iostream>
class close {
public:
void message();
};
inline void close::message()
|
by: metaperl |
last post by:
-- python -i
File "<stdin>", line 1
class = "algebra"
^
SyntaxError: invalid syntax
Why isn' t the parser smart enough to see that class followed by an
identifier is used for class...
| |
by: Miro |
last post by:
I created a field in a db called "Password"
If i do that, the Update row command throws an exception error.
If I call the field PWord then it works great.
Is this a reserved word for an...
|
by: Robert |
last post by:
I ask because, in Access help, it does not list is as such, however, I had a
table with a field named 'Name'. If I put a control on a form and used this
as the control source no problems, but if I...
|
by: adampierce |
last post by:
I am trying to run a pretty simple select query in Access 2007, and I
keep getting the error message "Reserved error (-1524); there is no
message for this error." There are no linked tables in the...
|
by: globalrev |
last post by:
class Foo(object):
def Hello(self):
print "hi"
object is purple, ie some sort of reserved word.
why is self in black(ie a normal word) when it has special powers.
replacing it with sel for...
|
by: ThatThatGuy |
last post by:
I was working in a online inventory application for my client....
I had a Access database......in which there was a few tables.....
In one of my tables i had columns like PurchaseDate,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |