When data have been edited on a form but not yet saved to the form's
RecordSource table/query, the form's Dirty property will be True.
If Me.Dirty Then
' the form's data have been edited but not saved yet
End If
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6668-detect-if-change-since-last-save.html
For the subform, if you're checking from the main form (which probably won't
do much good, as ACCESS will save a subform's data when focus moves from the
subform to the main form):
If Me.SubformName.Form.Dirty = True Then
where SubformName is the name of the subform control (the control that holds
the subform object).
--
Ken Snell
"Bob" wrote in message
news:eJRtNWN4FHA.1864@TK2MSFTNGP12.phx.gbl...
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6668
> Form - FormA that has a subform FormB. How do I detect in vb code if
> values in either form have been edited since last save?
>
> Thanks for any help
> Bob
>