AfterUpdate slight change?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

What do I put in this code so as any data in Combo309 will enter the date?
Thanks for any help

Private Sub Combo309_AfterUpdate()
Me.Combo309 = Nz(Me.Combo309, "")
If Me.Combo309 = " Any Data" Then
Me.tbBox5Date = Nz(Me.tbBox5Date, Date)
Me.tbBox5Date.Enabled = True
Else
Me.tbBox5Date = Null
Me.tbBox5Date.Enabled = False
End If
End Sub





..
 
Bob,

If I understand you correctly, I think this is what you're after...

Private Sub Combo309_AfterUpdate()
If IsNull(Me.Combo309) Then
Me.tbBox5Date = Null
Me.tbBox5Date.Enabled = False
Else
Me.tbBox5Date = Date
Me.tbBox5Date.Enabled = True
End If
End Sub
 
Thanks Steve exactly what I needed...Bob

Steve Schapel said:
Bob,

If I understand you correctly, I think this is what you're after...

Private Sub Combo309_AfterUpdate()
If IsNull(Me.Combo309) Then
Me.tbBox5Date = Null
Me.tbBox5Date.Enabled = False
Else
Me.tbBox5Date = Date
Me.tbBox5Date.Enabled = True
End If
End Sub
 

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

Back
Top