Designate Empty Field?

D

depawl

I need to specify a date field (MyDate) to be empty if certain
conditions in my form are met:

If <Conditions Met> Then
Me.MyDate.Value = Empty (or Contains No Data or IsNull)

I don't seem to be able to get it to work.
Thanksl
 
J

Jeff Conrad

Hi,

I think you could probably use the Form's Current event for this.

Something like:

Private Sub Form_Current()
If <Conditions Met> Then
Me.MyDate.Value = Null
End If
End Sub

Or maybe:

Private Sub Form_Current()
If <Conditions Met> Then
Me.MyDate.Value = ""
End If
End Sub

Hope that helps,
Jeff Conrad
Bend, Oregon
 
T

TC

You want:

me.mydate.value = null

though I personally would code that as:

me![mydate] = null

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top