?
Solved

Error 438 when determing if subform is dirty

Posted on 2009-04-05
3
Medium Priority
?
295 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 1000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

771 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