Requery a query based on Calendar Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am working on a database for my wife who is an independant hairstylist. I
currently have a form she will use to enter her daily appointments and use to
look back at previous days. I am trying to show her totals for each day on
the main form ie total income, total sales tax, total credit card fees etc.
I have created a query that will show all of this and I have created text
boxes in the form linked to this query, however even when I put
[Forms]![F_Appointments]![Calendar5] in the query's criteria I can't seem to
get it to requery automatically with a different calendar date. I have tried
adding code for on click of calendar do:
DaysTotal.Requery and F_Appointments.Form!DaysTotal.Requery and several
others however none seem to work. Any ideas on how I can solve this little
problem?
 
Hi there,

You could try adding an invisible textbox control onto your form and
setting it's control source as [Calendar5]. Then reference the
invisible text box in the query's criteria.

Then put DoCmd.Requery in the calendar_click() event and also in the
after update event of the invisible text box.

Not sure why this works and I'm sure there's a better way to do this,
but I remember having a similar problem once and that seemed to do the
trick.

Hope this helps - David
 
Back
Top