dbTalk Databases Forums  

If me.dirty...

comp.databases.ms-access comp.databases.ms-access


Discuss If me.dirty... in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dkintheuk
 
Posts: n/a

Default If me.dirty... - 02-28-2008 , 11:23 AM






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.

Reply With Quote
  #2  
Old   
ruralguy via AccessMonster.com
 
Posts: n/a

Default Re: If me.dirty... - 02-28-2008 , 11:37 AM






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:
Quote:
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.com
http://www.accessmonster.com/Uwe/For...ccess/200802/1



Reply With Quote
  #3  
Old   
dkintheuk
 
Posts: n/a

Default Re: If me.dirty... - 02-28-2008 , 11:54 AM



On 28 Feb, 17:37, "ruralguy via AccessMonster.com" <u12102@uwe> wrote:
Quote:
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.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2008...- Hide quoted text -

- Show quoted text -
Logical leap made... D'OH!

Ta.


Reply With Quote
  #4  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: If me.dirty... - 02-28-2008 , 12:52 PM



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
pleaseNOOSpamKallal (AT) msn (DOT) com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.