473,411 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Error code 3021 when I click delete

1
I am currently creating my project for visual basic, which is particularly a database. However, error code 3021 shows up when I click delete even though I do not have a database. How could I solve it?

Here is my code for the delete button ( when clicked if data is none, it displays an error).

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdDelete_Click()
  2. Confirm = MsgBox("Wait, are you sure about this?", vbOKCancel + vbExclamation, "Deleting...")
  3. If Confirm = vbOK Then
  4. library.Recordset.Delete
  5. MsgBox "Goodbye Record!", , "Record Deleted!"
  6. ElseIf Confirm = vbCancel Then
  7. MsgBox "Phew! That was close!", , "Phew..."
  8. End If
  9. cmdNext.Enabled = False
  10. cmdPrevious.Enabled = False
  11. txtTitle.Text = " "
  12. txtDirectors.Text = " "
  13. txtYear.Text = " "
  14. cboRating.Text = " "
  15. txtCharacters.Text = " "
  16. txtDescription.Text = " "
  17. End Sub
Apr 13 '10 #1
0 873

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Russ | last post by:
I keep getting this message "The compiler failed with error code 2000" when pressing PF5 to run Debug. This is not a compile error, it gets past the compile. I get this when it tries to load up my...
2
by: hansiman | last post by:
I'm wondering how best to present exception messages to a user. In a try catch I catch an OleDb.OleDbException. The error could be a COLUMN REFERENCE constraint error (by a deletion attempt). ...
0
by: jeffpriz | last post by:
We've got an issue here where we regularly receive an error page with the message "Compiler Error Message: The compiler failed with error code 2000." when we begin debug on our projects. The...
1
by: delusion7 | last post by:
Trying to create a table and insert records from a webform and I keep getting this message: "Successfully created the registration table. Unable to execute the query. Error code...
8
by: fish919 | last post by:
Hello All, I am having a little trouble with my database. The Database has a parent table with 5 or 6 children tables in it they are linked by a common id filed. The problem is that the...
1
by: psyvanz | last post by:
any code that can delete all records in just one click if you have a dataenvironment code it more good.. cause im working in this kind of code. like this: single delete code (not all in the...
2
by: learnaccess3 | last post by:
Dar team need u r help I am new to aceess . I am writign a query in access for finding the last name mathcing with criteria using Like operator. selct a,b,c from Table1 where last name like...
1
by: sajidk | last post by:
Hi All, I am very new to DB2 programming. I have written a SQL stored procedure and called it from C# . The program is working but it is not returning the error code and sqlstate code. If i...
8
by: ncsthbell | last post by:
I have created a form in access 2007 and have the property set to 'datasheet view'. The record source is a query that displays duplicate rows. I want my user to be able to highlight a row and use...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
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...
0
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 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.