Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with expression 1

Status
Not open for further replies.

Smack

Technical User
Apr 20, 2001
261
US
My date in a subform field is =Now()but I added this later on. the records were imported from another system, so I have about 1900 records where that field is null. How would I write an expression that If Null then date =2-1-01? The null records are messing up my sorting.
-Smack
 

Use NZ function.

Select NZ(DateCol, #2-2-2001#) Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Hi Terry, tried what you said,
Select NZ(DateCol, #2-2-2001#)
And I got an error message "The syntax of the subquery is incorrect, check and enclose in parenthesis. I checked the help, and looked at their examples and tried
(Select NZ(DateCol, #2-2-2001#)
And
(Select [NZ](DateCol, #2-2-2001#)
Neither of which worked.
-Smack

 
Please post the entire query.

Thanks, Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time.
NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
 
Hi1

Just make an update query. Choose your date field and in the criteria put IsNull and in the update to put #2-01-2001.

hth
Jeff Bridgham
 
Thanks Jeff! That was so simple I feel stupid. But then again, thats a common feeling working with access!
-Smack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top