link one subform to another

AnnPhil

Registered User.
Local time
Today, 22:13
Joined
Dec 18, 2001
Messages
246
Hello,

I have a form with a tab control that has subforms on each tab. I want a button that when clicked on will go to another tab and goto the record that has the same jobid number. I am able to get the code to work as far as going to the next tab but when i tell it to goto the record that matches jobid with the other jobid from other subform i get errors. Is there code that will allow me to goto a record and put a where condition so that i can get this to work?

Any help is appreciated, Thanks
 
What is the identifier on your main form? As far as my experience dictates, whatever link you use to create your relationship between your primary form and your first subform, you need to use also for any subsequent subforms.

For example, if on your first tab you have a JobID that relates to the records being displayed, you need to refer to that JobID on each subsequent subform. So, if your first form (lets assume this is frmMain) has the JobID, on each subsequent subform you call it by adding a field with the source =[Forms]![frmMain]![JobID].

I don't know if this is the only way to do it, or if I've interpreted your problem correctly, but I hope it helps.

Good luck.
 
Thanks for replying Databasedonr, but i figured it out already. I used the "DoCmd.FindRecord" and added the criteria, that seems to work for me.
Because this subform is not tied directly to the main form, it is tied to a subform in the main form i had to try something else and this seems to work.
 

Users who are viewing this thread

Back
Top Bottom