Thank you so much for all that. Ill check it all out now.
Thank you so much for all that. Ill check it all out now.
Ok Now I am really confused. Thank you for all your work but I still have not learned anything. Please explain to me what you wrote. This is almost totally different from what we have been discussing. I am really trying to learn VBA so I can use it when I need it. This wont be an isolated problem.
Private Sub CHIncome_LostFocus()
If Me.Dirty Then Me.Dirty = False
Me.Parent.Qry180ExpIncDailyNet.Form.Requery
End Sub
1. I still dont know what ME means.
2. I dont know what dirty means
3. Why am I using an if then statement now
4. Me.Parent.Qry180ExpIncDailyNet.Form.Requery <----- cant i just write that by itself
If Me.Dirty is TRUE when any bound control has been changed.
THEN Me.Dirty = False simply saves the record
If Me.Dirty Then Me.Dirty = False is a single line If...Then statement. It is just like
The ME in this case is referring to the form where the code resides (FmCheckingEntry) And Me.Parent is referencing the MainForm on which the SubForm resides (Master).Code:If Me.Dirty = True Then DoCmd.RunCommand acCmdSaveRecord End If
ok so you are suggesting that I use this statement instead then? I am guessing that me.dirty=true means that "this object has not recorded the new value yet." Am I right in my understanding?![]()
The Dirty property is True when a bound control has been changed and the value has not yet been written back to the table. As you will find, there seems to always be several ways in Access to accomplish the same thing. Pick whatever method you are comfortable with.
Bookmarks