Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Open at Last Edited Record

Discussion in 'Information Technology' started by lmv, Nov 9, 2005.

  1. lmv

    lmv
    Expand Collapse
    Guest

    I am trying to have my form open with the last edited record (which is a
    subform). The subform is accessed by a combobox in the footer. I already have
    the following so updates are verified.
    Private Sub Form_BeforeUpdate(Cancel As Integer)
    Dim strMsg As String
    strMsg = "Data has changed."
    strMsg = strMsg & "Click Yes/Save or No/Discard changes."
    If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
    'do nothing
    Else
    Me.Undo
    Cancel = True
    End If
    End Sub
    I read that in order to have the form open the Table needed a field
    LastEdited (is what I used) Date/Time set to Now() so I have done that but I
    don't know HOW to put the code in the FORM'S BeforeUpdate event, set the
    value of the LastUpdated field to Now()
    Because I already have the above in there and I don't know how to/where to
    insert it or ?? Or is it suppose to be attached to the combo box. Or is it
    suppose to go after my code IF the info is updated.

    Thanks!
     
  2. Loading...


Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page