M
Michaelk
I have 2 subforms on the MainForm.
First subform - Control name StList with the form AllStores inside.
Controls on the form StNo and StName (store number and name).
Second subform - Control name GrpList with form GrpStores inside.
Same controls on the second form StNo and StName .
Both subforms in datasheet view.
When I double click on the StName of AllStores subform it adds the record
in the group stores table, refresh the form and this store appeares in the
group list.
So I need to set focus on the record with just added store in the group
list.
This is what I do afte run query to add the record.
Dim mform As Form
Dim sform As Form
Dim stnamevalue
stnamevalue = "NewGrpStorename"
Set mform = Forms!MainForm
mform.Refresh 'after main form refreshed it poits to
the first record on group subform
' in the StNo field
Set sform = mform!GrpList.Form
sform.SetFocus
I was trying DoCmd.FindFirst and also was trying to set sform.RecordsetClone
and do FindFirst on recordset. Seems doing something wrong.
Anyway what is the proper way to to find stnamevalue on the sform?
Regards,
Michael
First subform - Control name StList with the form AllStores inside.
Controls on the form StNo and StName (store number and name).
Second subform - Control name GrpList with form GrpStores inside.
Same controls on the second form StNo and StName .
Both subforms in datasheet view.
When I double click on the StName of AllStores subform it adds the record
in the group stores table, refresh the form and this store appeares in the
group list.
So I need to set focus on the record with just added store in the group
list.
This is what I do afte run query to add the record.
Dim mform As Form
Dim sform As Form
Dim stnamevalue
stnamevalue = "NewGrpStorename"
Set mform = Forms!MainForm
mform.Refresh 'after main form refreshed it poits to
the first record on group subform
' in the StNo field
Set sform = mform!GrpList.Form
sform.SetFocus
I was trying DoCmd.FindFirst and also was trying to set sform.RecordsetClone
and do FindFirst on recordset. Seems doing something wrong.
Anyway what is the proper way to to find stnamevalue on the sform?
Regards,
Michael