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

Linking a subform to a subform

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I have a tab page, which I want to have a subform in form view, but also a subform in table view with just a few columns shown form the same data source/

However, when I move records in the form view i want the table view to move to the same record and vice versa, so you can scroll through the table view sub form and the form view sub form will move to the same record.

can this be done via link relationship or do I need to set up an 'onCurrent' event for each sub form and then do a 'move to record' some how via VBA code?

Advise on best way to achieve this affect is appreciated.

1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
I've tried an 'oncurrent' event with
Code:
    DoCmd.GoToRecord acDataForm, "Fin_Pro subform", acGoTo, Me.CurrentRecord

But I get an error saying 'Fin_Pro subform' isn't open when it is it is showing and clearly embeded onto the main 'contacts' form.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
I've gone wioth the oncurrent event option
Code:
    If Me.CurrentRecord <= Forms!contacts![Fin_Pro subform1].[Form].Recordset.RecordCount Then
        ID = Me.CurrentRecord
        Forms!contacts![Fin_Pro subform1].SetFocus
        DoCmd.GoToRecord , , acGoTo, ID
        [Forms]![contacts]![Fin_Pro subform].SetFocus
        DoCmd.GoToRecord , , acGoTo, ID
    End If

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top