If me.dirty...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dkintheuk

    If me.dirty...

    So I have a form showing my data items with a selection tick box to
    indicate when an item is active.

    I want to save the record automatically when someone clicks in the
    tick box.

    So I imagine this...

    Sub Active_Dirty (Cancel as Integer)

    Save current record...

    End Sub

    What command am i missing where it says Save current record... ?

    Can anyone advise?

    Cheers,

    Rob.
  • ruralguy via AccessMonster.com

    #2
    Re: If me.dirty...

    You are aware that if a record is Dirty then Access *will* save it unless you
    take some extraordinary steps?

    If Me.Dirty Then Me.Dirty = False
    ...will save the current record.

    dkintheuk wrote:
    >So I have a form showing my data items with a selection tick box to
    >indicate when an item is active.
    >
    >I want to save the record automatically when someone clicks in the
    >tick box.
    >
    >So I imagine this...
    >
    >Sub Active_Dirty (Cancel as Integer)
    >
    Save current record...
    >
    >End Sub
    >
    >What command am i missing where it says Save current record... ?
    >
    >Can anyone advise?
    >
    >Cheers,
    >
    >Rob.
    --
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
    Please post back to this forum so all may benefit.

    Message posted via AccessMonster.c om


    Comment

    • dkintheuk

      #3
      Re: If me.dirty...

      On 28 Feb, 17:37, "ruralguy via AccessMonster.c om" <u12102@uwewrot e:
      You are aware that if a record is Dirty then Access *will* save it unless you
      take some extraordinary steps?
      >
      If Me.Dirty Then Me.Dirty = False
      ..will save the current record.
      >
      >
      >
      >
      >
      dkintheuk wrote:
      So I have a form showing my data items with a selection tick box to
      indicate when an item is active.
      >
      I want to save the record automatically when someone clicks in the
      tick box.
      >
      So I imagine this...
      >
      Sub Active_Dirty (Cancel as Integer)
      >
       Save current record...
      >
      End Sub
      >
      What command am i missing where it says Save current record... ?
      >
      Can anyone advise?
      >
      Cheers,
      >
      Rob.
      >
      --
      RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
      Please post back to this forum so all may benefit.
      >
      Message posted via AccessMonster.c omhttp://www.accessmonst er.com/Uwe/Forums.aspx/databases-ms-access/2008...- Hide quoted text -
      >
      - Show quoted text -
      Logical leap made... D'OH!

      Ta.

      Comment

      • Albert D. Kallal

        #4
        Re: If me.dirty...

        Since the check box is to trigger this code, then you use the after update
        event of the check box.

        simply go:

        me.refresh

        or, better

        if me.dirty = true then
        me.Dirty = false
        end if


        --
        Albert D. Kallal (Access MVP)
        Edmonton, Alberta Canada
        pleaseNOOSpamKa llal@msn.com


        Comment

        Working...