John,
If the date is null I would like to swich to a table rather than the form view currently.
I want a script to to let the user know when they type in that one date that they will be switched to a table view.
I would like to have that displayed for enough time to read and then switch to that view. However, if that is not
possible, for them to close the box and it switches to the table.
I hope this is clear enough.
Thanks
I'm sorry, that's even MORE confusing!
If the user types in the date field then it is ipso facto not NULL.
You don't say what you want to see in the "table view".
You don't say what the user is expected to do with this table - just
look at it? memorize something from it that they will then need to
retype once it's off the screen? or what?
Could you step back a bit and explain - from the user's point of view
- what you want to accomplish, rather than how you want to accomplish
it?
If you're not willing to do that, put code like this in the
AfterUpdate event of the textbox:
Private Sub txtDatefield_AfterUpdate()
If CDate(Me!txtDatefield) = #12/27/2004# Then
MsgBox "Click OK to switch to table view", vbOKOnly
DoCmd.OpenTable "TableName"
End If
End Sub