Date comparison

Abbosy

Registered User.
Local time
Today, 11:10
Joined
Dec 4, 2013
Messages
59
Hi guys of the Forum

I managed with your help to make a new control checks two records and displays the largest of them.
You adviced me to put this in OnCurrent() event.
It did very well and was working fine until I added a new record that picked up both days automatically (auto fill). Unfortunately it wasn't dealing with the new record the same way.
I need to fix this bug.
What exactly I need is when any of the records loaded again for the same procedure to work. Where shall I put the procedure for it to work in this way? :banghead:

Many Thanks
Abbosy
 
On Current you can check if the record is New, so if it is New do not perform the Check else perform it..
Code:
Private Sub Form_Current()
    If Not Me.NewRecord Then
        [COLOR=Green]'your Code to do the comparission[/COLOR]
    End If
End Sub
 
From your description, it is difficult for us to understand exactly how this is failing.

Specifically, this doesn't make much sense to me:

until I added a new record that picked up both days automatically (auto fill). Unfortunately it wasn't dealing with the new record the same way.

You need to supply more details or attach your database (or at least the relevant objects) or at the very least supply a link to the post you are referring to in your message.
 
On Current you can check if the record is New, so if it is New do not perform the Check else perform it..

I am amazed that you understood his question!
 

Users who are viewing this thread

Back
Top Bottom