• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

Error 438 when determing if subform is dirty

I have a main bound form with a bound subform on a control tab.  I need to determine if there have been any changes made on the subform but receive Run Time Error 438:  Object doesn't support this property or method.

Any ideas?
Dim strDirty As Boolean
           strDirty = .sfrmDASelect.Dirty
           If strDirty = True Then
           Else
                    MsgBox "You must first select which Design Authorities to send notifications."
                    Set f = Nothing
                    Set objOutlookMsg = Nothing
                    Set objOutlook = Nothing
                    Set objOutlookRecip = Nothing
                    Set objOutlookAttach = Nothing
                    Exit Function
            End If

Open in new window

0
ALPC_EngineeringIT
Asked:
ALPC_EngineeringIT
1 Solution
 
peter57rCommented:
If you are running this code from the main form, then one thing is certain, the subform is NOT dirty, because when you returned to the main form the subform record would have been saved.

If you are running the code in the subform then you can use
If me.dirty.....
0
 
Rey Obrero (Capricorn1)Commented:
if you are calling the codes from the main form
use
          me.sfrmDASelect.form.Dirty
0
 
ALPC_EngineeringITAuthor Commented:
I am using the code in a Public Function but overlooked ".form" before ."dirty".   Something so simple that caused such frustration.

Thanks so much for you help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now