Phucon-
Is the form bound (has a Record Source)?
What code do you use to set txtQtrDate (the entire procedure, please)?
What code runs the query? Is it an Action query? What is the SQL of the query?
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of cc
Sent: Thursday, October 27, 2011 8:26 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] What causes the value of a control missing
I have a form that runs a query. The form has 2 controls named txtCurrentDate,
txtQtrDate. The date field in the query's criteria is based on the form's
txtQtrDate control' value,
its value is like this : Me!txtQtrDate = DateSerial(Year(Me!txtQtrDate),
Int((Month(Me!txtQtrDate) - 3) / 3) * 3 + 1, 0). The txtCurrentDate'value is set
to =Date().
The query is like this: Select * from tblAssets as A Where A.dt = Me.txtQtrDate
Order by A.dt;
Everything is working fine until no record was matched (err.Number 3021, No
current record), when this happens, the txtCurrentDate on the form became blank.
The txtQtrDate stays intact.
My code, the RunQuery procedure does not set it to Null or "", what causes the
date missing??
Phucon
------------------------------------
Yahoo! Groups Links
Kamis, 27 Oktober 2011
RE: [MS_AccessPros] What causes the value of a control missing
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar