Quick Question...

Ok... I don't know whether this will help any possible helper of me help me better :confused:

But unless the non-starter or non-completer fields are changes from N/A they whole record is not being counted as "Dirty" and ideas why??

Thanks

Andy
 
I looks like you're setting a value in your code:

If Me.NonStarter = "N/A" And Me.Non_completer = "N/A" Then
Me.DropOutQSent = False
 
Andy

A record becomes dirty if you edit a form field, change a combo box value or move to another page. As soon as you move to another record, the one you are leaving becomes clean again.

Therefore, your check can never be valid. Nothing has changed. Also, as this check occurs on the On_Current event, it only happens when the record is clean to begin with.

If you want to set his value, you must do it after the record becomes dirty and is flagged as a valid record. You could put it in the OnDirty event instead.
 
Yes but the standard layout of my form with all it's visibles & invisibles are scrambled when you look at it now...


I need to be able to;

If a user sets non completer to anything other than N/A I need some fields to disapeer and some to reappear. But if they have made a mistake and they need to change, thney can do and the fields will change again to the correct layout. (This bit works)

When you exit and then just go into edit the same record the view is scrambled by code that is On_Current, as unless Non Starter or Non completer are set to something other than N/A they are not counting as dirty even if you have every other field on the record completed.

It is this that is causing me trouble...

Is there someeway I can ask it to only run the code On_Current if the autonumber is set? i.e. not a new record and therefore showing "(autonumber)"??

Thanks for everyone's patience, I don't think I've explained myself very well at times...

Andy
 
andy_dyer said:
Is there someeway I can ask it to only run the code On_Current if the autonumber is set? i.e. not a new record and therefore showing "(autonumber)

Haven't read the whole thread but saw this question.

Try:

Code:
Private Sub Form_Current()

    If Not Me.NewRecord Then
        [b](your code in here)[/b]
    End If

End Sub
 
Thanks Mile-O-Phile!!

That was exactly what I was after and all is once again well on my database, until the next barrage of updates are requested!!

Thanks again all who have suggested ways forward!!

Andy



:D :D :D
 

Users who are viewing this thread

Back
Top Bottom