refresh button

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

need help

I am creating and form which is created form a table and also has a subform
that is imbedded in th eform that is based off of a query. What is want to do
is have 2 date fields, one for start and one for end and have a toggle button
to press which will update the subform based on the start and end dates. Can
some one help with this?
 
need help

I am creating and form which is created form a table and also has a subform
that is imbedded in th eform that is based off of a query. What is want to do
is have 2 date fields, one for start and one for end and have a toggle button
to press which will update the subform based on the start and end dates. Can
some one help with this?

Base the subform on a Query with a criterion such as
= Forms!YourFormName!txtFrom AND < DateAdd("d", 1, Forms!YourFormName!txtTo)

referencing the start and end date controls on your form (the DateAdd bit will
handle values with a time portion, making sure the records during the last day
of the range are displayed).

You can Requery the subform in the AfterUpdate events of both textboxes:

Private Sub txtFrom_AfterUpdate()
Me!subformname.Requery
End Sub

John W. Vinson [MVP]
 
Back
Top