By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

MS Access cannot Undo

100+
P: 134
I have a list box which show all the Supplier PO Numbers, on the Right of the list box there is a command button called "Add", If user click the "Add' Button it will create a new PO

DoCmd.OpenForm "frmPO", , , stLinkCriteria, acFormAdd

In the New PO Form, If user decide to undo, user click the Undo button

me.undo

It seem like it cannot be undo, so I issue a delete and undo the current record , this time no complain from Ms Access,

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Me.Undo
DoCmd.Close

But when I return to the listbox, another new PO number was auto created.
What wrong with it ? Iwhich is the better or correct method.

Please Advise
Dec 26 '06 #1
Share this Question
Share on Google+
4 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

Your PO number is it an autonumber, or it is a number that u introduces using append query?

In fact DoCmd.OpenForm "frmPO", , , stLinkCriteria, acFormAdd oppens a new form that is ready for adding information.... I don't see how it is inserted automatically the information about your PO number? It should be introduced automatically or taped manually?

If it is an auto number your PO so there is no Undo command that can restore the previous autonumber!

For more help, can u describe how do u introduce your PO number /auto generation, or user have to introduce it/?
If it is the introduction of This PO number you can do it using a field from your current form without opening a new form destinated to this introduction! Only using an append query!

Marry Cristmas!

I have a list box which show all the Supplier PO Numbers, on the Right of the list box there is a command button called "Add", If user click the "Add' Button it will create a new PO

DoCmd.OpenForm "frmPO", , , stLinkCriteria, acFormAdd

In the New PO Form, If user decide to undo, user click the Undo button

me.undo

It seem like it cannot be undo, so I issue a delete and undo the current record , this time no complain from Ms Access,

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Me.Undo
DoCmd.Close

But when I return to the listbox, another new PO number was auto created.
What wrong with it ? Iwhich is the better or correct method.

Please Advise
Dec 26 '06 #2

100+
P: 134
Hi,

Your PO number is it an autonumber, or it is a number that u introduces using append query?

In fact DoCmd.OpenForm "frmPO", , , stLinkCriteria, acFormAdd oppens a new form that is ready for adding information.... I don't see how it is inserted automatically the information about your PO number? It should be introduced automatically or taped manually?

If it is an auto number your PO so there is no Undo command that can restore the previous autonumber!

For more help, can u describe how do u introduce your PO number /auto generation, or user have to introduce it/?
If it is the introduction of This PO number you can do it using a field from your current form without opening a new form destinated to this introduction! Only using an append query!

Marry Cristmas!

Hi Merry Christmas to you, The PO is an auto number, so what should I do to overcome this problem, please help
Dec 26 '06 #3

100+
P: 134
Hi,

Your PO number is it an autonumber, or it is a number that u introduces using append query?

In fact DoCmd.OpenForm "frmPO", , , stLinkCriteria, acFormAdd oppens a new form that is ready for adding information.... I don't see how it is inserted automatically the information about your PO number? It should be introduced automatically or taped manually?

If it is an auto number your PO so there is no Undo command that can restore the previous autonumber!

For more help, can u describe how do u introduce your PO number /auto generation, or user have to introduce it/?
If it is the introduction of This PO number you can do it using a field from your current form without opening a new form destinated to this introduction! Only using an append query!

Marry Cristmas!
It is an auto number, when user click the Add button, it will open up the PO form, (I did not use Query Append), if user enter information in the form, the PO number example 100 will be show, next user click the undo button, so the form is close, to my surprise the listbox that show all PO have generated a PO 101 with blank information.
Dec 26 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
It is an auto number, when user click the Add button, it will open up the PO form, (I did not use Query Append), if user enter information in the form, the PO number example 100 will be show, next user click the undo button, so the form is close, to my surprise the listbox that show all PO have generated a PO 101 with blank information.
Set one of the other fields to required and the record will not be saved.

Mary
Jan 1 '07 #5

Post your reply

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