Newbi needs a very small help, thank you very much.


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.SetWarnings False

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

DoCmd.SetWarnings True


Exit_Cancel_Click:
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.RunCommand acCmdDeleteRecord

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?

0
6655326
8/1/2007 8:14:20 AM
access.forms 6864 articles. 2 followers. Follow

0 Replies
865 Views

Similar Articles

[PageSpeed] 10

Reply:

Similar Artilces:

Need help with http://support.microsoft.com/?kbid=212686
I am trying to use the KB article at http://support.microsoft.com/?kbid=212686 to increment an Invoice number automatically. I am confused about where they want me to put the code. They make refference to storing the code in a "Protected form template" I don't know what this is. Can someone please help Thanks That's for Word isn't it. Try John's solution at http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- HTH RP (remove nothere from the email address if mailing direct) "John" <anywhere@s.com> wrote in message news:OwiWKS0pFHA.1948@...

Newbie, accnts. payable & accnts.receivable sample DB
Hi guys, I�m running access 2003, windows xp pro SP2 I've been commission in my work to do a small application to track and report the accounts payable and accounts receivable movements, I'm not an accounting savvy person :(, does anyone know of a link or sample access database that can help me with the basic structure of the tables and reports?, any help would be greatly appreciated. Thanks ...

I need help to display a dialog from a resource-only DLL
Hi, I created a resource-only Dll to store string, dialog, icon and bitmap. With loadstring function i can load a string from this dll, but i don't know how dipslay a dialog from it. here is my code : UINT CDataResource::GetResourceDialog(int ResourceID) { // load resource LPCDLGTEMPLATE lpDialogTemplate = NULL; HGLOBAL hDialogTemplate = NULL; HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(ResourceID), RT_DIALOG); HRSRC hResource = ::FindResource(hInst, MAKEINTRESOURCE(ResourceID), RT_DIALOG); hDialogTemplate = LoadResource(hInst, hResource); if (hDialogTemplate != NULL) ...

Help needed in print
hi I am displaying lot of labels and progress bars in side form view. I want to print all the label and progress bar as it looks in the form view. thanks in advance with regards Harish Harish, You might be interested in Joe Newcomber's site, here: http://www.flounder.com/mvp_tips.htm#Bitmap%20series where you'll find code for screen copying and bitmap printing. Johan Rosengren Abstrakt Mekanik AB "Harish" <harish.k at sify.com> a �crit dans le message de news:OCcSb3u5DHA.2580@TK2MSFTNGP11.phx.gbl... > hi > > I am displaying lot of labels and progress...

Visio Newbie
Hello all, this is my first time using Visio for drawing a floor plan and I have a quick question. Yesterday, (Using a tape measure) I mapped out the floor plan of an office my company might be moving into. I wrote everything down in Inches. Is there a way once I get a room shape kinda close to teh measurements, that I can manually type in teh length for each wall? if not in inches, at least in feet. For example, I have one wall that is 154 inches ( 12.83 ft) Then the next wall is 242 incehs( 20.1 ft) The opposite wall of the first measurement is 288 inches, third wall 100 inches, then 13...

Exchange newbie problem
Hi all; A user on our domain was deleted when he should not have been. His mail box was not deleted. When his account was recreated, we tried to reconnect the old mailbox. But when selecting a user in the "Select a new user for this mailbox" dialog a message comes back saying that the user cannot be found. We tried several different users a none can be found even though they can get there mail just fine. We need to get the messages from this mailbox. Any ideas would be great -- Craig in the High Desert. craig@craignet.com But it's a dry heat. you should be able to reconnec...

C++ / Access Newbie
Hi Folks... I have a small commercial package written in C++ (targeted to Windows platforms) that uses its own proprietary database. We are just starting to investigate the option of replacing our database with a commercial package, such as Access or MySQL. Can anyone recommend informative reading that provides details on programming C++ with either of these two databases? At this stage we have no (any I mean ZERO) experience such programming. Any information would be helpful: recommendations for Access over MySQL (or vice versa), sources of such comparisons, licensing considerations, OD...

Freight allocation to Inventory cost
Landed cost does not work for our company. We need the ability to apply an average Freight cost or a percentage to every item in inventory at the time it is received in. The cost could be applied by the weight of the product or a simple % increase. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "...

Jscript Assistance Needed
Hi We need to auto calculate what percentage of the damaged amount has been recovered.We manually calculated that the field named Percentage equals the Recovered Amount divided by the Damaged Amount multiplied by 100. We wrote the following Jscript; crmForm.all.new_percentage.DataValue = crmForm.all.new_recoveredamount.DataValue / crmForm.all.new_damagesamount.DataValue * 100 to do this for us. After using the OnSave event, we continue to receive an error stating that ' This control only accepts strings or null as an input'. I am not sure where I am going wrong and would real...

Help with Excel ActiveX listbox controls
Hi! I�m trying to create listboxes that displays data from a named range spanning multiple columns. I am able to populate the listbox with data and use it without any problems. However, if the sheet that contains the listboxes changes, the size/dimensions of the listbox unexpectedly also changes. Since I have not written any procedures that control the height/width properties of the listboxes, I cannot determine why the dimensions of the listboxes are changing. I have attached a spreadsheet that illustrates this problem. When you open the spreadsheet, you should see two listboxes named Lis...

Need help finding the right function, please
The cells in Col A contain one of four values. The cells in Col D contain dates. I want to return the highest date for each of the four values. I'm having a difficult time understanding how the different look up functions work to allow me to get =(MAX(all dates in Cold D where Col A = "x")). The Help files for both LOOKUP and VLOOKUP indicate the values in the column to be searched must be sorted in ascending order. That can't happen in this sheet. I'm stuck with them as they are. A drop-kick in the right direction would be much appreciated!! Ed Try =MAX(IF(A1:A...

HELP: Sheet embedded comboboxes
Hi all, I am assisting somebody with their excel project and they have a sheet with comboboxes in it. When a value is selected, it populates cells underneath, however when the data is freshly loaded, the cell underneath is given the value but the combobox does not update to this value. I have tried to click on the box to edit it, however no matter how many times i click i cannot seem to get it to recognise i've clicked. In other words, the resizing box does not come up and i have no right-click menu. All i can do is select from the drop down list without any editing of the proper...

newbie
joining the group Hey Newbie where are you from and what versiona re you using? Fliehigh "cthomas23@hotmail.com" wrote: > joining the group > ...

Need expert coding help with a debugging issue.
I've got a piece of code in a form on my front end db that updates a record in a table based on certain criteria. My problem is that this code seems to have a flaw in it that allows multiple instances of this code, running on different machines, to access the exact same record in the table, if the following conditions are met: 1. The code is executed at the exact same time 2. The record being updated in the target table has no current value The table has three fields: Bin Number, Vendor Name, and Count. My problem is that when Vendor Name is empty when the code is run by two users a...

Codes needed to update wages
Hi, Column A of Sheet1 holds the identity numbers of about 200 casual members of our staffs. Column F shows their current weekly wages. I need a simple macro that allows me to update the weekly wages for some of these members by 4.5% from a list of their identity numbers shown in Column A of Sheet2. Any help is much appreciated. TIA Tom Here one shot at it: Sub payBoost() Dim lr As Long, sh As Worksheet, rng As Range Dim fRng As Range Set sh = ActiveSheet lr = sh.Cells(Rows.Count, 1).End(xlUp).Row Set rng = sh.Range("A2:A" & lr) Set...

Need to seperate alpha numeric data in a cell
I have a number of cells that contain words and numbers. How can I ge rid of or seperate the numbers form the data. e.g Cell A1 contains - Bridge Terminal 123456 I need to just get 123456 Please note numbers can be anywhere in the data and are differen lengths. Thanks in advance Andre -- Message posted from http://www.ExcelForum.com I think you need a user defined function (UDF) for this. Go to the VB editor, insert a new module and enter the following: Function OnlyNumber(xstrIn) Dim i As Integer Dim strReturn As String For i = 1 To Len(xstrIn) If IsNumeric(Mid(xstrIn, i, 1)) Then st...

need a macro...
hi am i the need of a mactro My requirement is to check whether the review sheets are complete.Certain columns should be filled after review,both by the reviewer and the one whose work is being reviewed. my input is an excel sheet with a column containing the name of the review sheets. My macro should open these sheets one by one and check whether those columns are filled properly,if not indicate by some means. to automate the manual checking whether the review sheets are completely filled... can anyone help in this ...

Help with calculation #3
On sheet2 I have a list of dates where A1 is 01 Jan 2004, A2 is 01 Feb 2004 etc through to 01 Oct 2005, against each date is a column of figures. So A1 is the date and B1 is the volume. On sheet1 I want to have a formula that will calculate the total volume between 2 dates selected by the user, where D7 is the earliest date and D9 is the latest date. So after they have input the dates the volumes between those dates will be totaled and shown in E10.(They will only be able to input dates for the 1st of the month - so as to match the data held on sheet2.)As you appreciate there will be more tha...

Help on SUM cells with formulas
At F199 I have the formula =SUM(F177:F198) but rows 177 to 198 contain formulas like =(+E180-E179) and F199 formula won't work. Do I need to extract correctly the values only? is it possible? Thanks much. Benjamin What exactly does "formula won't work" mean? What kind of return are you getting? No answer? - Wrong answer? - Error message? -- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! -------------------------------------------------------------------...

Real Newbie newbie question
Hi All - I hope you can help me! I have Finepix M603 camera and although I take reasonable shots in daytime, I'm not able to produce anything at night. eg On The Thames on New Years Eve, may people were using digital cameras and their screens should clear bright picture - mine was black! What setting should I set on mine? Any advice really appreciated. --- David Scott Hampshire, England Wrong group. Sorry....... -- --- David Scott Hampshire, England "Dave" <cadasco@SUPERhotmail.com> wrote in message news:50kuejF1fh28sU1@mid.individual.net... > Hi All - I hope...

eConnect newbie
Hi, I've installed eConnect 7.5 and am planning to use this to read & write xml files to GP can anyone give me samples or examples of how to do this, also my company is planning to upgrade to GP 9 shortly are there major changes between each version? Thanks in advance. JimB If you've installed eConnect, then you have several samples already. They are located in the samples folder underneath the eConnect installation. The changes from 7.5 to 9.0 are fairly minimal. Mostly, there are new xml elements that can be included, but many of those are optional. It's my gue...

matching, vlookup, index help.
Hi, I was wondering if anyone could help me formatting my spread sheet for work. I need to enter a state, by selecting it in a drop list, and then the agency rates for that state automatically shows up in a table that I have prepared and is ready to be calculated. How do you enter something in one cell and it automatically results in numbers to appear in other cells? Please help -Thankyou. Hi Mike use a combination of data / validation to create the drop down list and VLOOKUP function to populate the related information assuming that in Sheet2 you have the following A B ...

MDI newbie ?
I want to add a "reload" command that will close the current(and only) document and reload it again. Here is what I have tried so far: <code> AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_FILE_NEW); while(AfxGetApp()->GetOpenDocumentCount() > 0); AfxGetApp()->OpenDocumentFile(currentFluPath); </code> This doesn't work, because, as I've learned ID_FILE_NEW create just that, a new blank document so count is still 1. I can't figure out what I should check for, how I can know when the ID_FILE_NEW is done so that I can call OpenDocumentFile() Does ...

Run Integration Quicker-Newbie
I am running an integration to import sales orders for invoicing. I use several additional query criteria in IM, but I do not think these criteria are passed to SQL Server 2000. Instead, the records are returned, then the criteria are applied. The integration is taking quite a bit of time to run. Does anyone have an idea on how to pass the criteria to SQL Server, or any other ideas to increase the performance? Thanks. use a SQL Server View "Shannon LeVert" <slevert@aviagen.com> wrote in message news:06c701c46daa$fbad4100$a501280a@phx.gbl... > I am running an in...

not complaining about anything... want to say thanks!
I had asked for you guys to give me an ability to drop foreign character set email into the bit bucket because it wasn't worth the time to identify as junk mail one by one. I noticed today that under your safety options tab on the upper right I can block email by unicode character set encoding. this is absolutely great... if everyone did this or at least the majority of us we wouldn't be getting spammed by foreign character set email. ....awesome start. thanks! We guys didn't do anything . . . . . this is a volunteer group, your peers, who just try to help peo...