On 8 Feb 2006 19:05:32 -0800, "TD" <dl**@adsi-sc.com> wrote:
Me refers to the current form (or report).
Me.AddMode most likely refers to a property of that form. Could be a
method, but less likely.
AddMode is not a regular property of a form. Check with the help file
- it's not there. So it was created by the user. You know you can add
properties to a form, right?
Private m_blnAddMode as Boolean
Private Property Get AddMode() As Boolean
AddMode = m_blnAddMode
End Property
Your code can then inspect this property to see what the AddMode value
is:
If Me.AddMode = True Then
'Run append query
else
'Run update query
end if
If you study the examples, you'll find code similar to the above.
There will likely also be a Property Let to set the value of some
internal variable (m_blnAddMode in my example):
If <user_created_new_record>
Me.AddMode = True
End If
-Tom.
Can someone can explain to me what this is - Me.AddMode ? I saw it in
Alison Balter's Mastering Access 2002 Enterprise Development book. She
uses it to determine if a Save button should run an update query or an
append query. I have emailed her for an explanation but so far have
not received a reply. Just hoping someone here has read this book and
might know what it is and how she created it.
Thanks,
TD