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

Problems with TabControl/Subform

Status
Not open for further replies.

jmgibson

Technical User
Oct 1, 2002
81
0
0
US
Hi everyone. I'm in the process of creating a way where a user can go in and select (via combo box) a Job title and then assign that Job Title a educational course or courses. Since there are multiple categories of classes (Basics, Supervisory, etc), I created a tabcontrol on my Main Form, and I'm using a sub form to present the classes for that category.

To avoid having redundant subforms (one for each category of class), I've setup a query that that looks for the active Category name for each tab, so when the query runs, it pulls only the classes for that category.

The problem I'm having is when the user goes in, they are presented a screen where they select the Job Title on the main page, then they go through each tab (category of classes) and setup course that that job title needs to take. As long as I stay on that job title, it works fine, but as soon as I change to a different job title, the courses don't present correctly by category, and the drop down I'm using to list available classes (also restricted by the tab category, stop working). My initial thought was that I needed to add a me.requery statement so the forms refresh, but that doesn't seem to work.

I've added the file to my yahoo page, so it should be accessible. The primary form of interest is title "MainForm" which has the subform embedded.

Any help would be extremly appreciated!!! Thanks, Mark
 
Not looking at your form, I am assuming that the comboboxes on your subforms are not refreshing when the selection changes on the main forms combo box.

You need to requery those comboboxes...

Code:
Me!Subform_Control_Name.form!Combo_Box_NAME.Requery


That line (fixed up to your object names) everytime the job title changes or on the Job Title after update event. IF the main form is bound you should make a procedure for that and also call it on the main form's on current event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top