473,549 Members | 2,260 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to bypass 'No current record' error

When I delete a record in a subform I get the warning that I'm about to
delete a record, followed by an error "No current record." When I
click OK obviously the record is deleted and it goes to the first
record (as I've coded it to do) or it shows me a blank record if the
deleted record was the only one.

So, what I'd like to do is bypass that 'No current record' altogether
to avoid user confusion. Is there any way to code it out without
ignoring my error handling?

Thanks!!

Nov 13 '05 #1
3 26254
If is occurs in Access 2002 Service Pack 3, then it is a known bug.

Temporarily comment out any error handler handler so your code pauses at the
error. Note the error number. In the error handler part of your code, just
ignore that error, i.e. insert:
If Err.Number <> xxxx Then

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"hebandgene " <sa*****@yahoo. com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
When I delete a record in a subform I get the warning that I'm about to
delete a record, followed by an error "No current record." When I
click OK obviously the record is deleted and it goes to the first
record (as I've coded it to do) or it shows me a blank record if the
deleted record was the only one.

So, what I'd like to do is bypass that 'No current record' altogether
to avoid user confusion. Is there any way to code it out without
ignoring my error handling?

Nov 13 '05 #2
Allen, THANK YOU! That is exactly what I needed. However, my error
didn't have a number so I used...

If Err.Description = "No current record" Then Resume
Exit_cmdDeleteW all_Click

Doin' the Access Happy Dance...
Heather

Nov 13 '05 #3
It does have a number, given by Err.Number.

I believe this one is 3021.

(Better to use the numbers, in case MS changes the messages, or your db is
used in a different language.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"hebandgene " <sa*****@yahoo. com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Allen, THANK YOU! That is exactly what I needed. However, my error
didn't have a number so I used...

If Err.Description = "No current record" Then Resume
Exit_cmdDeleteW all_Click

Doin' the Access Happy Dance...
Heather

Nov 13 '05 #4

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

Similar topics

2
5301
by: Tony | last post by:
Hello, I am having difficulty in getting the current record of the current form to show after pressing a command button that takes me to another form. The command button takes me to another form that I want to show the record of the previous form I left. The problem is that the form does not show any other record but the current one...
4
4134
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I want all of the controls in whatever is the CURRENT record to have it's data bolded on the screen. (Question #1: Is there a SIMPLE way to refer to...
8
12070
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
1
2955
by: 4004 | last post by:
I would like to open a columnar form (so I can see all the details) from a datasheet form (so I can see what is there) but keep the same recordset and current record. I can do the recordset set part (stlinkcriteria) - but how do I have the new form open on the record that was current in the datasheet form? I don't want to filter to the...
2
2718
by: Thomas Guignard | last post by:
Hi there I need to run an XSLT stylesheet on XML files generated by another app that seem to have errors. When I try to run my XSLT processor (MSXML engine, run through the Cooktop editor), I get the following error message ERROR: pattern constraint failed. The element: '{http://www.loc.gov/MARC21/slim}leader' has an invalid value...
16
2928
jayme
by: jayme | last post by:
ms access 2000. on my default switchboard there is a button that opens up a form(named Inquiry Find). on the form you can type in an "Inquiry Number" then click the button to look up that certain number and all the information that goes with it-which is on another form (named JOB TRACKING form). so it automatically brings up that record in the...
5
7379
by: eighthman11 | last post by:
Hi everyone: This is probably a pretty simple problem but it is driving me nuts. Using Access 2000. I have a continuous form which list several thousand inventory items. The user can enter a order quantity on any given line. I have several different error checks depending on what the user enters in the quantity text box. What I need...
3
11741
by: CanuckChuck | last post by:
I have a code for enabling a command button to password protect the enabling/disabling of the Shift bypass. For some reason though I keep recieving a syntax error when I try to use it. I copied the code from the following link: http://www.databasedev.co.uk/disable_shift_bypass.html It seems to have a problem with the part that reads: MsgBox "The...
2
64471
by: Ian | last post by:
I am trying to save the current record on a form before opening a report, doesn’t sound to hard does it? The code on a buttons on click event goes like this: DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 'First save record I used this for many years with problems using Access 97, when the database is upgraded to...
0
7546
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7985
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6071
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5111
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3496
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1962
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 we have to send another system

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.