Hi John,
I need more help please.

In my form "frmAssets" I have 2 controls; [ReplacementValue] and
[ReplacementValueDate].
If a Replacement Value is entered I want to force the user to enter a
Replacement Value Date.

The following piece of code is converted from a macro I created. I did this
so that I could de-bug it, because when this condition is true, the focus
would not return to the ReplacementValueDate.
The message box displays and then control goes to MsgBox Error$.
Can you please give me a clue as to why this is happening?
I have done similar bits of code but not with dates in them, and I can't see
what is wrong with this.
Thank you in anticipation

Ilona
Adelaide, Australia



Private Sub ReplacementValueDate_LostFocus()
On Error GoTo ReplacementValueDate_LostFocus_Err

    If (Eval("[Forms]![frmAssets]![ReplacementValue]<>0 And
[Forms]![frmAssets]![ReplacementValueDate] Is Null")) Then
        Beep
        MsgBox "Please enter Replacement Value Date", vbOKOnly, ""
        DoCmd.GoToControl "[ReplacementValueDate]"
    End If


ReplacementValueDate_LostFocus_Exit:
    Exit Sub

ReplacementValueDate_LostFocus_Err:
    MsgBox Error$
    Resume ReplacementValueDate_LostFocus_Exit

End Sub


[Non-text portions of this message have been removed]



SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to