Go To Record With Combo Box?

gnarpeggio

Registered User.
Local time
Yesterday, 23:06
Joined
Jun 22, 2010
Messages
74
Hello,

I have a combo box in a form that lists each section of my office. My form also contains a subform that lists specific criteria per section.

I'm trying to get the combo box to go to the specific set of records in the subform when that section is clicked. Currently, the combo box is thinking that I'm trying to change the section for that record only...

Any ideas?

Thanks!!!
 
You probably want to use Docmd.FindRecord in preference to DoCmd.GotoRecord. The difference being that FindRecord actually finds a record based on certain criteria, whilst GotoRecord goes to a specific record ie. the first the last of the Xth record in the list.
 
Just fyi: You can also use the Combo box wizard and select the 3rd option. Follow the wizard all the way through. If the subform is linked to the parent form, then it should do the job.
 
Excellent. The combo box wizard helped greatly. I will keep the FindRecord option in mind though.

Thanks fellas!
 
It's all team work and I'm glad you got it working!
 
Actually, I have a similar question that just came to mind regarding this task. How would I get the form/subform to display the information for all records as well? This way users can look for records with the section or simply look at all of the records for every section.

Thanks again!
 
Not quite a similar question.

It depends on what code the wizard created.

How do you intend to design this? Will users be presented with a "Remove Link" or "Remove Filter" button and an "Apply Filter" button of some sort?

That said, it doesn't make sense to allow users to view all records via a subform when the parent form is showing something else. You will just be opening more room to confusion and to be put simply that's just bad design. Subforms are intended to link to their parent form and remain that way which is why they are called "sub".
 

Users who are viewing this thread

Back
Top Bottom