Solved

Error 438 when determing if subform is dirty

Posted on 2009-04-05
3
290 Views
Last Modified: 2012-05-06
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
Comment
Question by:ALPC_EngineeringIT
3 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 24071659
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
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 24071660
if you are calling the codes from the main form
use
          me.sfrmDASelect.form.Dirty
0
 

Author Closing Comment

by:ALPC_EngineeringIT
ID: 31566770
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question