Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Confirm record changes checked. Why no confirmation messages?

Discussion in 'Information Technology' started by Steve Ginzbarg, Nov 7, 2005.

  1. Steve Ginzbarg

    Steve Ginzbarg
    Expand Collapse
    Guest

    ACC 2000, ACC 2003: Even though Tools>Options>Edit/Find>Confirm Record
    Changes is checked, I receive no confirmation message when I make changes to
    a record and save the changes by moving to another record. Why not?
     
  2. Loading...

    Similar Threads Forum Date
    USA Radiation Coverups Confirmed: Los Alamos, Fort Calhoun, Fukushima, TSA Breaking News Jul 5, 2011
    Hinduism Does Sikhism Confirm the Existence of Hindu Gods/Goddesses? Interfaith Dialogues Mar 2, 2011
    General Research confirms that drinking gives you the same benefits yoga does! Hard Talk May 14, 2010
    Opinion Swine Flu grips Punjab, eight confirmed cases, 93 suspected cases identified Punjab, Punjabi, Punjabiyat Jun 16, 2009
    Computer Virus: Confirmed By snopes.com Information Technology Jul 19, 2008

  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Sun, 6 Nov 2005 09:16:06 -0800, "Steve Ginzbarg" <Steve
    Ginzbarg@discussions.microsoft.com> wrote:

    >ACC 2000, ACC 2003: Even though Tools>Options>Edit/Find>Confirm Record
    >Changes is checked, I receive no confirmation message when I make changes to
    >a record and save the changes by moving to another record. Why not?


    Because the Option refers to confirmations if you run an Update Query
    or another query which modifies table data, not for changes made
    manually in a datasheet or a Form.

    The assumption is that if you're looking at data on a form and choose
    to change it, that you want to do so; and that users would be annoyed
    at getting a prompt for every single record that they edit.

    If you want a prompt to appear on a Form, use the Form's BeforeUpdate
    event:

    Private Sub Form_BeforeUpdate(Cancel as Integer)
    Dim iAns As Integer
    iAns = Msgbox("Are you sure you want to change this record?", vbYesNo)
    If iAns = vbNo Then
    Cancel = True
    End If
    End Sub

    If you want a prompt to arise when you open a table datasheet and edit
    it... you're out of luck; table datasheets don't provide any usable
    events for this purpose.

    John W. Vinson[MVP]
     
  4. Mail Merge Help

    Mail Merge Help
    Expand Collapse
    Guest

    Hi John

    What if I don't want to save the change and close the form.

    This is my code, when I click No, it doesn't closed the form

    Private Sub Save_Exit_Click()
    On Error GoTo Err_Save_Exit_Click

    Dim iAns As Integer
    iAns = MsgBox("Are you sure you want to change this record?", vbYesNo)
    If iAns = vbNo Then
    Cancel = True

    Else

    DoCmd.Close
    End If
    end sub

    "John Vinson" wrote:

    > On Sun, 6 Nov 2005 09:16:06 -0800, "Steve Ginzbarg" <Steve
    > Ginzbarg@discussions.microsoft.com> wrote:
    >
    > >ACC 2000, ACC 2003: Even though Tools>Options>Edit/Find>Confirm Record
    > >Changes is checked, I receive no confirmation message when I make changes to
    > >a record and save the changes by moving to another record. Why not?

    >
    > Because the Option refers to confirmations if you run an Update Query
    > or another query which modifies table data, not for changes made
    > manually in a datasheet or a Form.
    >
    > The assumption is that if you're looking at data on a form and choose
    > to change it, that you want to do so; and that users would be annoyed
    > at getting a prompt for every single record that they edit.
    >
    > If you want a prompt to appear on a Form, use the Form's BeforeUpdate
    > event:
    >
    > Private Sub Form_BeforeUpdate(Cancel as Integer)
    > Dim iAns As Integer
    > iAns = Msgbox("Are you sure you want to change this record?", vbYesNo)
    > If iAns = vbNo Then
    > Cancel = True
    > End If
    > End Sub
    >
    > If you want a prompt to arise when you open a table datasheet and edit
    > it... you're out of luck; table datasheets don't provide any usable
    > events for this purpose.
    >
    > John W. Vinson[MVP]
    >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    You're only calling DoCmd.Close if the user doesn't select No.

    The Cancel in that event, though, will not do anything. The only place
    Cancel makes a difference is in the BeforeUpdate, BeforeInsert or Unload
    events.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Mail Merge Help" <MailMergeHelp@discussions.microsoft.com> wrote in message
    news:CEB8E544-A42B-4116-9A92-3C8A8BC9AAF6@microsoft.com...
    > Hi John
    >
    > What if I don't want to save the change and close the form.
    >
    > This is my code, when I click No, it doesn't closed the form
    >
    > Private Sub Save_Exit_Click()
    > On Error GoTo Err_Save_Exit_Click
    >
    > Dim iAns As Integer
    > iAns = MsgBox("Are you sure you want to change this record?", vbYesNo)
    > If iAns = vbNo Then
    > Cancel = True
    >
    > Else
    >
    > DoCmd.Close
    > End If
    > end sub
    >
    > "John Vinson" wrote:
    >
    > > On Sun, 6 Nov 2005 09:16:06 -0800, "Steve Ginzbarg" <Steve
    > > Ginzbarg@discussions.microsoft.com> wrote:
    > >
    > > >ACC 2000, ACC 2003: Even though Tools>Options>Edit/Find>Confirm Record
    > > >Changes is checked, I receive no confirmation message when I make

    changes to
    > > >a record and save the changes by moving to another record. Why not?

    > >
    > > Because the Option refers to confirmations if you run an Update Query
    > > or another query which modifies table data, not for changes made
    > > manually in a datasheet or a Form.
    > >
    > > The assumption is that if you're looking at data on a form and choose
    > > to change it, that you want to do so; and that users would be annoyed
    > > at getting a prompt for every single record that they edit.
    > >
    > > If you want a prompt to appear on a Form, use the Form's BeforeUpdate
    > > event:
    > >
    > > Private Sub Form_BeforeUpdate(Cancel as Integer)
    > > Dim iAns As Integer
    > > iAns = Msgbox("Are you sure you want to change this record?", vbYesNo)
    > > If iAns = vbNo Then
    > > Cancel = True
    > > End If
    > > End Sub
    > >
    > > If you want a prompt to arise when you open a table datasheet and edit
    > > it... you're out of luck; table datasheets don't provide any usable
    > > events for this purpose.
    > >
    > > John W. Vinson[MVP]
    > >
     

Share This Page