Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Before Update on record select

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jk - 08 May 2007 18:18 GMT
I am getting no where fast. I have a main form and sub form and what i need
is a message to appear when user moves on to the next record using the record
selector on the bottom of the form. I have tried the beforeupdate on the form
but no results. Can form design prevent a message prompt?
Klatuu - 08 May 2007 18:58 GMT
You want the form Current Event.  It fires each time the record changes.
Signature

Dave Hargis, Microsoft Access MVP

> I am getting no where fast. I have a main form and sub form and what i need
> is a message to appear when user moves on to the next record using the record
> selector on the bottom of the form. I have tried the beforeupdate on the form
> but no results. Can form design prevent a message prompt?
jk - 08 May 2007 19:27 GMT
That was it. I am using a code that was kindly provided from this news group
as follows:

Private Sub Form_BeforeUpdate(Cancel As Integer)

Resp = MsgBox("DO YOU WANT TO CONTINUE TO NEXT CUSTOMER?", vbYesNo, "Stop!")
 If Resp = vbNo Then
    Cancel = True
 End If

End Sub

Message comes up but even answering the prompt with " NO" ,  it still allows
the user to click the recorder selector to move onto the next customer. What
needs to be changed for the message to really work?

> You want the form Current Event.  It fires each time the record changes.
>
> > I am getting no where fast. I have a main form and sub form and what i need
> > is a message to appear when user moves on to the next record using the record
> > selector on the bottom of the form. I have tried the beforeupdate on the form
> > but no results. Can form design prevent a message prompt?
Klatuu - 08 May 2007 20:25 GMT
One problem is that if no changes to the current record have been changed,
the Before Update event will not fire.
If you do make a change, the code as is should work.
I have gotten into the habbit of not using the standard record navigators,
but write my own so I can easily deal with this.
Signature

Dave Hargis, Microsoft Access MVP

> That was it. I am using a code that was kindly provided from this news group
> as follows:
[quoted text clipped - 18 lines]
> > > selector on the bottom of the form. I have tried the beforeupdate on the form
> > > but no results. Can form design prevent a message prompt?
jk - 08 May 2007 20:34 GMT
Thanks. To write code is a tad above what i am learning and i guess the
message box (even though it will not stop them) it will flag the user that
they have gone onto another customer. I appreciate the help on this.

> One problem is that if no changes to the current record have been changed,
> the Before Update event will not fire.
[quoted text clipped - 24 lines]
> > > > selector on the bottom of the form. I have tried the beforeupdate on the form
> > > > but no results. Can form design prevent a message prompt?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.