473,385 Members | 1,796 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,385 software developers and data experts.

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 26228
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.googlegr oups.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_cmdDeleteWall_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.googlegr oups.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_cmdDeleteWall_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
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...
4
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...
8
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...
1
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...
2
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...
16
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...
5
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...
3
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...
2
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,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.