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

Date Insertion Command Button Query

Status
Not open for further replies.

Rick4077

Technical User
Oct 19, 2004
149
US
This code (query) is run via a command button on a form.

I'm looking for a way to allow the user to insert a date, ie., 2006-08 into all three date fields at one time as they will always use the same date;

LISTDATE
PENDINGDATE
CLOSEDDATE

Thanks . . . Rick

Code:
SELECT OCDownloadRES.CITY, 

Count(OCDownloadRES.LISTDATE) AS [Sum ofLISTDATE], 
Count(OCDownloadRES.PENDINGDATE) AS [Sum of PENDINGDATE], Count(OCDownloadRES.CLOSEDDATE) AS [Sum of CLOSEDDATE]

FROM OCDownloadRES
GROUP BY OCDownloadRES.CITY, OCDownloadRES.PROPSUBTYPE
HAVING (((OCDownloadRES.PROPSUBTYPE)=[ENTER PROP TYPE]));

 
Hi Rick

This might be simplistic but try using the afterupdate action:

Private Sub Listdate_AfterUpdate()
Me.PendingDate.Value = Me.Listdate
Me.CloseDate.Value = Me.Listdate

End Sub

Alan

'Life is what happens to you while you are busy making other plans' John W. Lennon 1940-1980
 
Hi Alan . . . thanks, I'll try that and see how it works.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top