A
Andi Lee Davis
Hi,
Any Help most Gratefully Appreciated.
I have looked up the forms but nothing seems to really answer my question
just right and its very simple.
I have a Database which plots stories and plays into sections. I have a form
which is labelled SectionSheet which also has continuous subform named
SectionSheetMap. This Map is based on a query from the Main Table
SectionSheet.
The subform filters the list of all the sections to those with the main
character on the main form as a sort of overview. You can see which section
sheet is the characters next and pre section. So the Form and Subform are
linked by the section Character - Not the SectionNo which is the Primary Key.
What I would like to do is two things.
1) Highlight the font or make it bold on The SectionNo field in the Subform
and move to the recordset along the continuous form to match the record you
are on in the main form. - Haven't started working on this yet.
2) This is the bit I have been working on. On Double Click of a SectionNo of
the subform - Jump to that section in the main form. I have got so far and
managed to get the focus back to the SectionNo in the main form but it keeps
filtering the Subform to match the SectionNo in the Main form.
Here is the code I have already: (I used a filter to try it first)
Private Sub SectionNo_DblClick(Cancel As Integer)
Dim MapNo As String
MapNo = Form_SectionSheetMap.SectionNo
On Error GoTo clickError
Me.Filter = " [Forms]![SectionSheet]![SectionNo] like " & MapNo & ""
Forms!SectionSheet!SectionNo.SetFocus
Me.FilterOn = True
clickError:
Resume Next
End Sub
Thanks
Andi
Any Help most Gratefully Appreciated.
I have looked up the forms but nothing seems to really answer my question
just right and its very simple.
I have a Database which plots stories and plays into sections. I have a form
which is labelled SectionSheet which also has continuous subform named
SectionSheetMap. This Map is based on a query from the Main Table
SectionSheet.
The subform filters the list of all the sections to those with the main
character on the main form as a sort of overview. You can see which section
sheet is the characters next and pre section. So the Form and Subform are
linked by the section Character - Not the SectionNo which is the Primary Key.
What I would like to do is two things.
1) Highlight the font or make it bold on The SectionNo field in the Subform
and move to the recordset along the continuous form to match the record you
are on in the main form. - Haven't started working on this yet.
2) This is the bit I have been working on. On Double Click of a SectionNo of
the subform - Jump to that section in the main form. I have got so far and
managed to get the focus back to the SectionNo in the main form but it keeps
filtering the Subform to match the SectionNo in the Main form.
Here is the code I have already: (I used a filter to try it first)
Private Sub SectionNo_DblClick(Cancel As Integer)
Dim MapNo As String
MapNo = Form_SectionSheetMap.SectionNo
On Error GoTo clickError
Me.Filter = " [Forms]![SectionSheet]![SectionNo] like " & MapNo & ""
Forms!SectionSheet!SectionNo.SetFocus
Me.FilterOn = True
clickError:
Resume Next
End Sub
Thanks
Andi