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!

selecting a subset of data - from a canendar control

Status
Not open for further replies.

Norwich

MIS
Mar 3, 2002
336
GB
Hi,

I'm having trouble with controlling the data displayed in a simple subform grid from a calander control in the main form.

The subform is a grid simply displaying the contents of a query: name, date and amount. I would like to use a calander control in the main form to filter the grid for records of that date only. The reason I'm using a subform is because it's on a tab control - with other tabs displaying similar data grids to be controlled int he same way - all filtered on the date from the calendar control.

Any ideas or pointers very welcome....

Thanks
 
Hi,

Don't know if you've tried this yet but, all you should need to do is set the criteria for the underlying query to [Forms]![FormName]![ControlName] and have the following in the onupdate event of the calender control

Private Sub ControlName_Updated(Code As Integer)

Requery

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top