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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering Records on Parent based on criteria entered on subform

Status
Not open for further replies.

Robbo1974

Technical User
Jun 1, 2001
151
GB
Hi all,

I have a contact management form which displays all of the records in the database which contains a subform that displays contacts made for that particular record. Using the filter by form function when I try to filter these contacts e.g. to find out which clients have been contacted on a particular day by entering that date in the 'date' field it only filters the records on the child form and ALL of the records on the parent form are still displayed.

How can I force Access to display only those records on the parent form which have a valid record on the subform? I am not a programmer by the way and my coding skills are pretty limited. I told the tight bastards that employ me to buy GoldMine but would they listen? No :-(
 
Hi Robbo,

don't be mad. Everybody is in crisis, so just take it as a good chance for getting more experience, okay.

Anyway, try to do this:

Create a combo box in the main form, which row source is based on the date field in the table.

Then on its afterupdate events, create a code:
docmd.gotocontrol "txtDate"
docmd.findrecord cboDate

(the txtDate is the textbox in the main form which holds date value from the record source of the main form)

Link the subform and main form through this date field (which you have probably done).

Good luck!

Tin Tin

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top