Solved

Error 438 when determing if subform is dirty

Posted on 2009-04-05
3
283 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
Comment Utility
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 119

Accepted Solution

by:
Rey Obrero earned 250 total points
Comment Utility
if you are calling the codes from the main form
use
          me.sfrmDASelect.form.Dirty
0
 

Author Closing Comment

by:ALPC_EngineeringIT
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Bulk load data error 5 33
Sum Max help (Add 1 Month) 3 19
formattig excel from access 3 17
Access on thin client? 11 23
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now