Date is Null

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to create a query where a particular date should not be displayed due to the size of records
Lets say I want the date 12/27/2004 not to appear in the query. I have tried to build a where expression but am going wrong somewhere. I know I should have is null possible the [date]. How do I put these together?
 
Don't know about Null, but the WHERE would be something like this:

WHERE [DateFieldName] <> #12/27/2004#


--
Ken Snell
<MS ACCESS MVP>

New2Adv said:
I am attempting to create a query where a particular date should not be
displayed due to the size of records.
Lets say I want the date 12/27/2004 not to appear in the query. I have
tried to build a where expression but am going wrong somewhere. I know I
should have is null possible the [date]. How do I put these together?
 
I am attempting to create a query where a particular date should not be displayed due to the size of records.
Lets say I want the date 12/27/2004 not to appear in the query. I have tried to build a where expression but am going wrong somewhere. I know I should have is null possible the [date]. How do I put these together?

I'm not at all sure what you're asking here! The phrase "I should have
is null possible the [date]" means nothing to me.

What exactly do you want to happen?

If the date is NULL do you want to display the record? or exclude it?
If the date is 12/27/2004 do you want to retrieve the rest of the
fields in the record, and just not display the date? Or do you want to
exclude all records with that date from the query?
 
John, I would like to go to a table instead of form view.
Thanks

Ok, fine; not my choice, but if that's what you want.

But you didn't answer my questions. I have no idea what you want to
see in this "table" (query, actually, since you're limiting the
records) view.

If the date is NULL do you want to display the record? or exclude it?
If the date is 12/27/2004 do you want to retrieve the rest of the
fields in the record, and just not display the date? Or do you want to
exclude all records with that date from the query?
 
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
 
Back
Top