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

Navigation Button problem

Status
Not open for further replies.

pd06498

IS-IT--Management
Dec 10, 2003
36
0
0
AU
In the database I have created, I have a main form which contains some employee information. I also have, under this part, a tabbed form(s) that contains other information from the main table on several tabs, and some subforms on others.

I have also created some of my own navigation buttons, to enable me to progress through employees.

My problem is, that regardless of what tabbed for I have open, whenever I click on the button to progress forwards or backwards, the database jumps to the last tabbed for and then progresses to the next ot previous employee record. I don't want this to happen. If I am on a particular tab and progress to another employee, I still want the same tab displayed.

Does anyone have any ideas?
 
The answer is TabName.SetFocus - Then you can use the navigation button.

Win2000P/Acc2000 - It's best to stay with products that work.
 
ineuw

Thanks for your reply.

I may not have explained my situation well enough. When I navigate from main form to main form, I would like whichever tabbed subform on the main form that has focus, to maintain that focus but to reflect the relevant details of each employee.

If I have tabs called training, skills and personal for instance, and I am looking at the tab form displaying the skills details, I want to be able to progress through the employees on the main form, and have the skills tab displayed reflecting information relevant to the displayed employee.

I hope this makes sense.
 
How are ya pd06498 . . . . .

There is a miscommunication in your post origination I'd like to make your aware of, for future reference.
[blue]I also have, under this part, a [purple]tabbed form(s)[/purple] that contains other information from the main table on several tabs, and some subforms on others.
[/blue]
You have a [blue]Tab Control[/blue] that contains other information from the main table, as well as subforms. . . . . [purple]See the difference?[/purple]

Hard to tell without more specifics, but I suspect you have [blue]subform referencing[/blue] problems. To be sure, post the code for a nav button that fails! . . . . and . . . post the name of the main form and any subform name involved in the failing button.





Calvin.gif
See Ya! . . . . . .
 
I assume that the main form is linked to Employees and each tab contains a subform, one for skills and another for personal ... etc. If this is the case, then you have to filter the RecordSource of the subforms by the selected employee RecordID. You can do that by setting FilterBy property in code for each record's On Current event as you navigate . . . as in RecordID= MainForm!RecordID.

Win2000P/Acc2000 - It's best to stay with products that work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top