Newbi needs a very small help, thank you very much.
Hello everyone and thank you very much for your time.
I Have a small db for invoicing and on my form (with a subform) there
is a CANCEL button which will just cancel what had been selected or
entered in the form ... here is the code behind the cancel button...
Private Sub Cancel_Click()
Me![BillsFormSub].Form.Refresh
DoCmd.SetWarnin gs False
DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.SetWarnin gs True
Exit_Cancel_Cli ck:
Exit Sub
End Sub
This was working fine for many years until just recently where I
upgraded to Windows XP with SP3 Off XP 2003 and the Access 2002
format. (from Off97)
And now everytime someone clicks the cancel button, I get an error
3021 code, and my bill goes up by one bill number.
I would very much appriciate if you could give me and example of a
code replacement for this cancel action that would work in my case.
Sincerely yours,
Mohammad Reza.
P.s in the meantime I have replaced the above two lines with:
DoCmd.RunComman d acCmdDeleteReco rd
and it seems it will delete the record as I want it with no error
messege, but now the problem is that the form is advancing to a new
record even thought the current one is also empty.
If I close and reopen the form though, everything is fine.
I tried pressing ESC twice, and using all sorts of DIRTY UNDO REFRESH
and REQUERY commands all to no use, the only way now to get to the
last record is to close and reopen the form, any ideas? 1 1458
On Aug 1, 3:14 am, 6655...@gmail.c om wrote:
Newbi needs a very small help, thank you very much.
Hello everyone and thank you very much for your time.
I Have a small db for invoicing and on my form (with a subform) there
is a CANCEL button which will just cancel what had been selected or
entered in the form ... here is the code behind the cancel button...
Private Sub Cancel_Click()
Me![BillsFormSub].Form.Refresh
DoCmd.SetWarnin gs False
DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.SetWarnin gs True
Exit_Cancel_Cli ck:
Exit Sub
End Sub
This was working fine for many years until just recently where I
upgraded to Windows XP with SP3 Off XP 2003 and the Access 2002
format. (from Off97)
And now everytime someone clicks the cancel button, I get an error
3021 code, and my bill goes up by one bill number.
I would very much appriciate if you could give me and example of a
code replacement for this cancel action that would work in my case.
Sincerely yours,
Mohammad Reza.
P.s in the meantime I have replaced the above two lines with:
DoCmd.RunComman d acCmdDeleteReco rd
and it seems it will delete the record as I want it with no error
messege, but now the problem is that the form is advancing to a new
record even thought the current one is also empty.
If I close and reopen the form though, everything is fine.
I tried pressing ESC twice, and using all sorts of DIRTY UNDO REFRESH
and REQUERY commands all to no use, the only way now to get to the
last record is to close and reopen the form, any ideas?
If you are trying to undo changes to a record that has not yet been
saved,
Private Sub Cancel_Click()
Me.Undo
End Sub
should work.
Bruce This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: laurie |
last post by:
Hi all,
I'm trying to help out a friend who has inherited a client with a PHP
shopping cart application. Neither of us know PHP, but I've been
muddling my way through, trying to get these old scripts working on a
new server with the most recent version of PHP. I've pretty much
taken care of all the various errors that were popping up. Most only
pointed out out non-fatal undefined or assumed variables. I've been
able to cure most of...
|
by: mickey |
last post by:
I am getting the following error at the line
mysql_free_result($result);
Warning: Supplied argument is not a valid MySQL result resource in
/var/www/html/php/phoneadd.php on line 27
My code is as follows:
<html>
|
by: Christoffer T |
last post by:
Sorry for bad subjekt.
I have just started to learn programing, and python sound like a god
choice.
But there is something I do not understand.
I want to write the code in notepad, and then open in a window. I use
win98.
I have tried to write "python file.py" in run, but it just very fast
open and close dos window. So what should I do to get to show the
program.
|
by: Amadelle |
last post by:
Hi all and thanks in advance,
I have written a class library in C# (a set of cs classes) which I would
like to install on our production webserver. It is used by some of the
asp.net pages that I have written. Everything ofcourse works great on my
local system. I have the class library set up as a different project with a
different path from the website addresses. I can see when I change the
configuration manager settings to Release...
|
by: Xah Lee |
last post by:
Software Needs Philosophers
by Steve Yegge, 2006-04-15.
Software needs philosophers.
This thought has been nagging at me for a year now, and recently it's
been growing like a tumor. One that plenty of folks on the 'net would
love to see kill me.
| |
by: stylecomputers |
last post by:
Hey guys,
I am absolutely new to Linux programming, with no w######s programming
experience except a small amount of C++ console apps.
Reasonably new to Linux, BSD etc, got good sound networking base of
knowledge and dont have any problem working the command line etc.
I want to learn a language that I can use in my networking duties that
is most likely to be of use to me. I have a few choices I can think of
being:
|
by: mk |
last post by:
Greetings all - im new to this newsgroup so pls dont flame me :p
I need some help! Please view the html below in a browser. Or goto this
url -http://firebrain.co.uk/java-problem.htm
(Assuming you have seen the rendered code)
Basically I need the X buttons to change all the values of each textbox
to zero either in the col or row depending on which button is clicked.
Function summery:
If you click on a X button on the right hand side of...
|
by: Strasser |
last post by:
In a nested subform in datasheet view, an interviewer of homeless
people picks a descriptive CATEGORY from 20 descriptive categories.
The 20 categories are displayed via a combo box.
(Categories are things like "addiction", "criminal", "dangerous?"
etc. Total number of categories = 20).
For EACH of the 20 categories there are 5 statuses, from
"bad" (1=worst) to "good" (5=best).
(Therefore, there are really 100 choices: 20 categories...
|
by: raylopez99 |
last post by:
I have a logical drawing space much bigger than the viewport (the
screen) and I'd like to center the viewport (the screen) to be at the
center of the logical drawing space. After following the excellent
transforms specified on Bob Powell's site, I still wonder if there's
an easier way of centering it than the following procedure?
Here is what I do now (it's awkward but it works):
1) I follow the transforms specified on Bob Powell's...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |