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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Referance

Status
Not open for further replies.

Steve1001

Technical User
Nov 1, 2002
17
US
Hi

I want a code to run when the current date passes the date set in a table, I am using the code below

If "date() " > "table.[sample.check]" Then

DoCmd.Quit


End If

where sample.check is the tabel and field with date, what hve i done wrong??

Many thanks

Steve
 
For starters
If "date() " > "table.[sample.check]" Then

You have put quotes around the text. This will always return the same result

If date() > table.[sample.check] Then

Secondly, where do you get table.[sample.check] from?

It ought either to be on a form, where the name would be more like [sample.check] (bad form to use .'s in a field name, or spaces). Or it might be from a recordset, in which case the name ought to be like rs("[sample.check]")

Peter Meachem
peter@accuflight.com

Support Joanna's Bikeathon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top