Solved

Error 438 when determing if subform is dirty

Posted on 2009-04-05
3
293 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

695 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