Hello there,
I have a bound-form using Navigator so that the user can move back and
forth to update record in the form. Every time a record was modified
and the user clicks the Navigator to either move backward or forward
to the next record, a message is popped up asking the user to confirm
the change. If the user clicks "Yes", the record should be updated
and the Navigator takes the user to the next record as clicked. If
the user does not want that change (clicks "No"), the record should
not be updated and still move backward or forward as the user chosed
so.
So, I think the best place to put this trap is in Form_BeforeUpdate
event, here is what I have (at the end of the event):
If MsgBox("Do you want to save this change?", vbYesNo, "Save changed")
= vbNo
Cancel = True
Exit Sub
End If
So far, after the user makes some change to the record and clicks the
Navigator: if the user clicks "Yes", the record updated fine and goes
to the next record as the Navigator direction was chosen.
My problem is when the user clicks "No": the record is not updated but
it stays right there without moving to the next record. Are there any
ways I could do to make the record not updating but still move as the
Navigator clicked?
Any helps are appreciated,
James 4 2184
Use the Me.Undo in place of Cancel=True.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
James P. wrote: Hello there,
I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user does not want that change (clicks "No"), the record should not be updated and still move backward or forward as the user chosed so.
So, I think the best place to put this trap is in Form_BeforeUpdate event, here is what I have (at the end of the event):
If MsgBox("Do you want to save this change?", vbYesNo, "Save changed") = vbNo Cancel = True Exit Sub End If
So far, after the user makes some change to the record and clicks the Navigator: if the user clicks "Yes", the record updated fine and goes to the next record as the Navigator direction was chosen.
My problem is when the user clicks "No": the record is not updated but it stays right there without moving to the next record. Are there any ways I could do to make the record not updating but still move as the Navigator clicked?
Any helps are appreciated, James
MGFoster <me@privacy.com> wrote in message news:<cr******************@newsread1.news.pas.eart hlink.net>... Use the Me.Undo in place of Cancel=True.
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
James P. wrote:
Hello there,
I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user does not want that change (clicks "No"), the record should not be updated and still move backward or forward as the user chosed so.
So, I think the best place to put this trap is in Form_BeforeUpdate event, here is what I have (at the end of the event):
If MsgBox("Do you want to save this change?", vbYesNo, "Save changed") = vbNo Cancel = True Exit Sub End If
So far, after the user makes some change to the record and clicks the Navigator: if the user clicks "Yes", the record updated fine and goes to the next record as the Navigator direction was chosen.
My problem is when the user clicks "No": the record is not updated but it stays right there without moving to the next record. Are there any ways I could do to make the record not updating but still move as the Navigator clicked?
Any helps are appreciated, James
Thank you so much for that. It works exactly the way I would like.
MGFoster <me@privacy.com> wrote in message news:<cr******************@newsread1.news.pas.eart hlink.net>... Use the Me.Undo in place of Cancel=True.
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
James P. wrote:
Hello there,
I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user does not want that change (clicks "No"), the record should not be updated and still move backward or forward as the user chosed so.
So, I think the best place to put this trap is in Form_BeforeUpdate event, here is what I have (at the end of the event):
If MsgBox("Do you want to save this change?", vbYesNo, "Save changed") = vbNo Cancel = True Exit Sub End If
So far, after the user makes some change to the record and clicks the Navigator: if the user clicks "Yes", the record updated fine and goes to the next record as the Navigator direction was chosen.
My problem is when the user clicks "No": the record is not updated but it stays right there without moving to the next record. Are there any ways I could do to make the record not updating but still move as the Navigator clicked?
Any helps are appreciated, James
Using the Navigator and applied the Undo command in Form_BeforeUpdate
event worked great for me when I used it for the first record I
encountered. But after that, if I want to update the next record
while still using the Navigator, it seems like that Undo would still
apply to the whole Form_BeforeUpdate after the first time the Undo was
activated and would not "know" that the form is being changed the
second time so I can update the next record.
Is my assumption right about the Undo command? Are there anyway I can
go back to "normal" stage in Form_BeforeUpdate in this case to allow
updating other records?
Thanks a lot,
James ha*********@yahoo.com (James P.) wrote in message news:<f4**************************@posting.google. com>... MGFoster <me@privacy.com> wrote in message news:<cr******************@newsread1.news.pas.eart hlink.net>... Use the Me.Undo in place of Cancel=True.
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
James P. wrote:
Hello there,
I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user does not want that change (clicks "No"), the record should not be updated and still move backward or forward as the user chosed so.
So, I think the best place to put this trap is in Form_BeforeUpdate event, here is what I have (at the end of the event):
If MsgBox("Do you want to save this change?", vbYesNo, "Save changed") = vbNo Cancel = True Exit Sub End If
So far, after the user makes some change to the record and clicks the Navigator: if the user clicks "Yes", the record updated fine and goes to the next record as the Navigator direction was chosen.
My problem is when the user clicks "No": the record is not updated but it stays right there without moving to the next record. Are there any ways I could do to make the record not updating but still move as the Navigator clicked?
Any helps are appreciated, James
Thank you so much for that. It works exactly the way I would like.
Never mind, guys. It's my fault. I had set up my own flag to prevent
it to update. So, I'm ok now. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dhcomcast |
last post by:
We're starting to use Oracle for the back-end instead of a separate
Access .mdb file for the data and everything as gone surprisingly well
so far. We are learning Oracle as we go; Yikes! But we...
|
by: Patrick |
last post by:
I'm working on a contact management application, and need a hand with one
aspect...
Here's what I want to create:
------------------------------------
A form split into two parts. There is a...
|
by: PAUL |
last post by:
Hello,
I have 2 tables with a relationship set up in the dataset with vb
..net. I add a new record to the parent table then edit an existing child
record to have the new parent ID. However when I...
|
by: Brett |
last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a
record in table2, then the not null fields in table1 that correspond to
the records in table1 needs to be updated to match the...
|
by: Dale Sampson |
last post by:
As you can tell, I am new to VS.net.
I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the...
|
by: njb35 |
last post by:
Hi all
I'm beginning my foray from VBA into VB 2005 Express, and enjoying
some of the efficiencies it provides! I'm stuck with some dataset
handling however that I _think_ can be automated but...
|
by: Randy |
last post by:
Hi,
I'm trying to figure out some binding navigator code. If I have the
primary field value as selected by the user in a combo box, how can I
instruct the binding navigator to move to that...
|
by: Cindy Huyser |
last post by:
I have an Access 2000 database behind a threaded Java application that
that can have have concurrent access to the same table (but not the same
record). The database is set up for shared access...
|
by: Michel Esber |
last post by:
Hi all,
DB2 V8 LUW FP 15
There is a table T (ID varchar (24), ABC timestamp). ID is PK.
Our application needs to frequently update T with a new value for ABC.
update T set ABC=? where ID...
|
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...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
| |