Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


MS Access VBA Forms

Posted on 2011-05-12
Medium Priority
Last Modified: 2012-08-13
This question is related to a previous question I asked.


When I'm checking my old value against the new value to see if it changed, when the old value is NULL it doesn't detect a change.  

If g_User_Task = "ReviseOrder" Then
        If Me.cboUDStakePockets.OldValue <> Me.cboUDStakePockets.Value Then
            Me.cboUDStakePockets.Value = Me.cboUDStakePockets.Value & " CHANGED"
        End If
    End If

Open in new window

So when the user opens the form and makes a selection from a combo box that was previously empty, the .oldvalue comes up as NULL and it doesn't detect a change.  Is there a way around this?  
Question by:AronMcD
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 2000 total points
ID: 35746505

If g_User_Task = "ReviseOrder" Then
        If Nz(Me.cboUDStakePockets.OldValue,"") <> Me.cboUDStakePockets.Value Then
            Me.cboUDStakePockets.Value = Me.cboUDStakePockets.Value & " CHANGED"
        End If
    End If

Author Comment

ID: 35746570
Yep that worked.  Thanks capricorn!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In this article, I will demonstrate that how to do a PST migration from Exchange Server to Office 365. This method allows importing one single PST, or multiple PST's at once.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

577 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