Solved

Error 438 when determing if subform is dirty

Posted on 2009-04-05
3
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 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