G
Gordon
I have a main form (frmVocalArrangements) with 2 subforms. This main
form lists recording artists (fldVocalistID), subform1 the music
titles ((fldMusicID) for them and subform 2 the disc recordings on
which are found those titles. For a particular artist selected, I
then select a music title , then click a button to enter details of a
new disc recording in a second form (the first form remains open).
When I close that second form. I requery the the first form and return
to it with the original recording artist selected. That part all
works fine but I want it also to set the focus on the orignal music
title but this part fails.
Here is the code I am using on the close event of the second form:
intVocalistID = Me.fldVocalistID
intMusicID = Me!fldMusicID
'Requery the original "master" form
Forms!frmVocalArrangements.Requery
'Do Recordsetclone processing
Set frm = Forms.frmVocalArrangements
With frm.RecordsetClone
.FindFirst ("[fldVocalistID]=" & intVocalistID)
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
intMusicID = Me.fldMusicID
Set frm = Forms.frmVocalArrangements.frmVocalArrangementsSubform1.Form
With frm.RecordsetClone
.FindFirst ("[fldMusicID]=" & intMusicID)
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
CloseForm Me
Can I use 2 bookmarks in this way or do I need another approach?
Thanks for any help
Gordon
form lists recording artists (fldVocalistID), subform1 the music
titles ((fldMusicID) for them and subform 2 the disc recordings on
which are found those titles. For a particular artist selected, I
then select a music title , then click a button to enter details of a
new disc recording in a second form (the first form remains open).
When I close that second form. I requery the the first form and return
to it with the original recording artist selected. That part all
works fine but I want it also to set the focus on the orignal music
title but this part fails.
Here is the code I am using on the close event of the second form:
intVocalistID = Me.fldVocalistID
intMusicID = Me!fldMusicID
'Requery the original "master" form
Forms!frmVocalArrangements.Requery
'Do Recordsetclone processing
Set frm = Forms.frmVocalArrangements
With frm.RecordsetClone
.FindFirst ("[fldVocalistID]=" & intVocalistID)
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
intMusicID = Me.fldMusicID
Set frm = Forms.frmVocalArrangements.frmVocalArrangementsSubform1.Form
With frm.RecordsetClone
.FindFirst ("[fldMusicID]=" & intMusicID)
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
CloseForm Me
Can I use 2 bookmarks in this way or do I need another approach?
Thanks for any help
Gordon