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!

Form opens on Date Query

Status
Not open for further replies.

KLewisBPM

Technical User
Jan 11, 2002
294
GB
Does anyone know how to set a date query running when a user opens a form.

When a form opens I would like it to check the system date against a date field in a username table. If the username date is in the past a form will open saying "Your username has expired please contact your Administrator"

Seems a simple logic, but possibly a complicated task!

Any help would be grateful.

Kind Regards

Kelley Lewis
 
You need to put the query in VBA code in the Form_Open event. If the username has expired you can set Cancel = True and Exit Sub. That will stop the form from finishing the opening process, so it will never actually open for this condition.

 
Are you in the U.S? If so, call me at 703-248-2100 and ask for Rick Smith

This is easy but have to ask some questions.

Network Security( CCNA, CISSP)
Sell Shopping Cart/Merchant Account
Access Expert
rsmith@litsllc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top