I come to you again to ask how to generate the calendar
controls that you had in your demonstration.
In those screen shots, I simply put in the calendar control that ships with
ms-access.
(however, be forewarned, that often MANY computers will NOT have this
component installed, and this opens up your application to breakage if you
move
it to another machine that does not have the control install.ed.).
So, you can do some testing to try this out. On a form in design mode, just
go insert->ActiveX control
Now, choose the Calendar control 11 (11 for access 2003, 10 for access 2002
etc.).
This calendar will thus appear on the form, and can be used in place of a
text box.
The mail merge worked wonderfully . but users are wanting to filter it
down
to letters sent by individual representatives so I have to add another
"Letter_Rep" kind of criteria and add that into the SQL string.
Good ...you have this working!!! Excellent...
Lets continue to assume a start/end date...but now you also add Letter_Rep
criteria
(this could be a text box, or even a nice combo box to select from).
The code would thus become:
dim strStart as string
dm strEnd as string
dim strSql as string
strSTart = "#" & format(me.txtStart,"mm/dd/yyyy") & "#"
strEnd = "#" & format(me.TxtEnd,"mm/dd/yyyy") & "#"
strSql = "SELECT First_Name, Middle_Init, Last_Name" & _
", Invite_to_Test, ecord_Created FROM [Applicant Data] " & _
" WHERE (Invite_to_Test = True) AND " & _
"Record_Created Between " & strStart & " and " & strEnd
if isnull(me.txtMyRep) = false then
strSql = strSql & " and Letter_Rep = '" & me.txtMyRep & "'"
end if
MergeAllWord strSql
' now udpate the reocrds....
strSql = "update [Applicant Data] set TestDone = true " & _
" where Record_Createed Between " & strStart & " and " & strEnd & _
" and Letter_Rep = '" & me.txtMyRep & "'"
docmd.RunSql strSql
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal