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

x
?
Solved

MS Access VBA Forms

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

http://www.experts-exchange.com/Microsoft/Applications/Q_27031414.html

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.  

Example:
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?  
0
Comment
Question by:AronMcD
2 Comments
 
LVL 120

Accepted Solution

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

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
0
 

Author Comment

by:AronMcD
ID: 35746570
Yep that worked.  Thanks capricorn!
0

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