472,805 Members | 4,067 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Need to have a save dialog for any data changes

I have a client who wants to have Access ask to save changes anytime
data is changed or added into the database. I'm not really an Access
guy, I actually run their servers, but have been dropped into the roll
because I have some understanding of it. Any help would be greatly
appreciated, they have me on a serious time line and I've been pulling
my hair out all day over this. Thanks in advance.
-Walter

Nov 13 '05 #1
1 1866
wa*****@gmail.com wrote:
I have a client who wants to have Access ask to save changes anytime
data is changed or added into the database. I'm not really an Access
guy, I actually run their servers, but have been dropped into the roll
because I have some understanding of it. Any help would be greatly
appreciated, they have me on a serious time line and I've been pulling
my hair out all day over this. Thanks in advance.
-Walter


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter,
My condolences. You should tell the cheapskates to hire an Access
developer. I knew of another network admin who agreed to work on an
Access project - blew the project & then quit in a huff.

Anyway... your problem can be solved in a number of ways.

Usually, when a user finishes entering data & closes the form or moves
to another record, the current record is saved (or attempted). This
attempt runs the Form's BeforeUpdate event. That is an ideal place to
have a "Save?" dialog. Here's how:

Open the form in Design view.
Open the form's Properties dialog box (double-click on the form).
On the main menu bar click: View > Code.
There are 2 "drop-down" boxes in the top of the VBA module, click on the
left-hand one and select Form.
Click on the right-hand drop-down box & select BeforeUpdate, the cursor
will move to the event procedure.
Enter this code inside the Sub:

Const MSG_SAVE = "Save this Record?"

Dim intAnswer As Integer

intAnswer = MsgBox(MSG_SAVE, vbQuestion+vbYesNoCancel, "Save Record")

Select Case intAnswer
Case vbNo: Me.Undo
Case vbCancel: Cancel = True
' Case Else: Do nothing, which = Yes, save the record
End Select

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQjHmyoechKqOuFEgEQK8XQCfWZ9R6IjMLkdUhHogi8Z8SG iJa7AAoJgL
z3jEC+ouJwxMLXwlx0/pRjyi
=Gnhm
-----END PGP SIGNATURE-----
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bob Hynes | last post by:
Hi All, This code is running in WinNT/Access97. I'm looking for some help with getting this code to do two(2) things better then it does now and I'm not sure how to do it. 1. On the...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
3
by: scorpion53061 | last post by:
Hello, This is a post that started in the vb.net newsgroup that I am having difficulty in getting answers to. It involves using the web browser control as the replacemnt for the Ole Container...
0
by: teddysnips | last post by:
I have Search form that allows users to retrieve records into a DataGrid. There are two search criteria - a Month and a Year, which are selected from drop-down lists. There is a server-side...
0
by: teddysnips | last post by:
I have Search form that allows users to retrieve records into a DataGrid. There are two search criteria - a Month and a Year, which are selected from drop-down lists. There is a server-side...
8
by: paquer | last post by:
I'd like to provide an Export Function from my forms, where the User can choose the File name & save location Although I cannot get the "Save As" dialog box to open properly from access. What is...
6
by: subhashkumar | last post by:
Running data Append to a table Dear All, I need a help from this forum, I was developing a small tools for stock market. I get stuck when trying to save the running changes in a data field...
3
by: vedika | last post by:
hi, I created one application in which there is export functionality. I am using sqlCE as database . When user click on "export" a save file dialog appeare and file saved in html format from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.