Re: Access 2000 mdb and an option box for saving record
From: Neil Ginsberg (news_at_nrgconsult.com)
Date: 09/01/04
- Next message: sc: "Re: implementing security....late"
- Previous message: Michael Thompson: "Can Not Secure a A2000 Database"
- In reply to: Rob S: "Access 2000 mdb and an option box for saving record"
- Next in thread: Rob S: "Re: Access 2000 mdb and an option box for saving record"
- Reply: Rob S: "Re: Access 2000 mdb and an option box for saving record"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 01 Sep 2004 16:11:28 GMT
In your form design view, go to the properties window, and, in the Event
tab, select [Event Procedure] for BeforeUpdate (make sure that the
properties window says "Form" in the title bar, so that you're modifing the
properties for the form). With the cursor in the BeforeUpdate line of the
properties window, click the ellipsis next to [Event Procedure]. You should
be brought into a window that looks something like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
End Sub
Somewhere between the "Private Sub" and "End Sub" lines, insert the
following so that the window now looks like:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save changes made to this record?",
vbQuestion+vbYesNo)=vbNo then
Cancel = True
End If
End Sub
That should take care of it.
Neil
"Rob S" <robatworkDeleteTheseFourWords@mail.com> wrote in message
news:4137d83b.21292336@giganews.nildram.co.uk...
>
> Hi,
>
> Firstly I'm a complete Access novice.
>
> We have inherited a Access 2000 mdb with various names and addresses
> stored,
> which we access through a form. I can let either everyone or no-one update
> the
> database with file permissions, but what I want to be able to do is let
> everyone
> make amendments, but have a Yes/No dialogue as they leave the record/quit
> the
> database so they can save or discard their amendments to that record. Or
> failing
> that an "update mode" button on the form which changes just that record
> from
> read only to read/write.
>
> This surely isn't that complicated, but we've struggled all afternoon on
> it. So
> far we have come up with a macro associated with the BeforeUpdate event,
> which
> pops up a warning MsgBox, but can't see anywhere to have a Yes/No box.
> Would we
> need to get into VB for something as simple as this?
>
> regards
>
> -Rob
> robatwork at mail dot com
- Next message: sc: "Re: implementing security....late"
- Previous message: Michael Thompson: "Can Not Secure a A2000 Database"
- In reply to: Rob S: "Access 2000 mdb and an option box for saving record"
- Next in thread: Rob S: "Re: Access 2000 mdb and an option box for saving record"
- Reply: Rob S: "Re: Access 2000 mdb and an option box for saving record"
- Messages sorted by: [ date ] [ thread ]