I have a tab control that has five tabs for each workday placed on a form.
Is there a way to filter the records by date and a user-supplied ID? To make
the question easier, how do I filter the records on the first tab to include
only those with the system date (which is in a text box on the form)?
The pages of a Tab control aren't actually designed to contain
different data. A Tab control is a tool to share screen space among
multiple controls. What's the structure of your Table or Tables? Do
you have textboxes bound to different fields on the tab pages?
You may want to consider putting a Subform on each tab page. For
instance: you could have a combo box on the mainform, cboID, allowing
the user to select the ID; and on each page of the Tab Control have a
textbox with a Control Source such as
DateAdd("d", 2 - DatePart("w", Date()), Date())
for the Monday tab, with 3 for Tuesday, ..., 6 for Friday. These might
be named txtMonday, txtTuesday, ... txtFriday.
Your five subforms would then have Master Link Fields like
cboID;txtMonday
and Child Link Fields referencing the ID and date fields in the
subform's recordsource query.
John W. Vinson[MVP]