How to handle empty date fields

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi all,

You guys are the best, I've gotten so much good information from this
group that it's not even funny!

I'm writing an access database at work (that's going to be used
temporarily until the better client-server setup is completed) that
keeps track of every item in our stores, and allows the user to
manipulate some of the data.

I've created a column in the database of items called "audit_date" (of
type date) that keeps track of the last time an item had any of it's
information modified. When an item number is looked up and a row is
modified, I just store the system date in the audit-date field.

I want to show the last known audit_date on the screen with the other
relevant item related information after I've searched and pulled up an
item. My problem is that most items are not yet going to have anything
store in the audit_date field... in which case I want the system to
display "Never" in the text box that's linked to that field.

I assumed that this would be as easy as creating an if statement in VB
to the effect of:

If recordset!audit_date Is Null Then text_audit_date = "Never"
Else text_audit_date = recordset!audit_date
endif

But it doesn't appear to want to work that way. I need to understand
what is stored in an empty date field if there is no data. I apparently
can't compare looking for Nulls, the system doesn't seem to like that
too much.

Any thoughts?

.



Relevant Pages

  • Re: How to handle empty date fields
    ... group that it's not even funny! ... I'm writing an access database at work (that's going to be used ... I just store the system date in the audit-date field. ...
    (microsoft.public.access.forms)
  • Re: Frequent versus One Time Opening / Closing Database
    ... I'am writing an application in Visual Basic 6.0 in which I have multiple ... workstations working with the same access database on a central computer ... But it depends on the data access libraries you are using, ... What's the general nature of your app? ...
    (microsoft.public.vb.database.ado)
  • Re: HELP: Populate form fields (intranet) from a workbook(network driv
    ... to Tools - Disconnect Network Drive you will see the drive name that the ... say if the file was Access or Excel that you wanted to store the ... access database using Excel VBA to perform the storage. ...
    (microsoft.public.excel.programming)
  • Re: Data Base Interface Wizard update problem
    ... Excuse me what do you mean by timestamp field?In my access database i need a ... field of type date/time in order to store the date ... separate field with type timestamp? ...
    (microsoft.public.frontpage.client)
  • Re: confused about crystal reports with .NET 2.0 and C#[need basic advice]
    ... to impress people at work i tried writing my ... etc from a Win forms app which uses an access database. ... Is that only for web apps, if it is'nt then could anyone point me to a ...
    (microsoft.public.dotnet.general)