J
JohnE
Hello. I have a main form with a subform on it. The main form is the one to
the subform many. I have it that when the main form changes the subform also
changes. The table that feeds both of these is one table. Similar to an
Employee's table with a supervisor is also an employee but can also have many
subordinates from the same table.
Anyway, what I am looking to do is to have a button on the subform
(continuous) at the end of each record that when click will change the
mainform to the selected subform record. An example is if the mainform had
record 2 showing with record 20, 35, 46 showing in the subform, if I select
#35, the mainform no goes to that record.
Currently, the code I am attempting to use is the following;
Option Compare Database
Option Explicit
Dim recordnum As Long
Private Sub btnGoTo_Click()
recordnum = Forms![frmChangeRequestDetail].CurrentRecord
Forms![frmChangeRequestDetail].Requery
DoCmd.GoToRecord acDataForm, "frmChangeRequestDetail", acGoTo, recordnum
End Sub
What is occuring with this code is that nothing changes but the form(s) do
requery.
Can anyone assist on this?
Thanks... John
the subform many. I have it that when the main form changes the subform also
changes. The table that feeds both of these is one table. Similar to an
Employee's table with a supervisor is also an employee but can also have many
subordinates from the same table.
Anyway, what I am looking to do is to have a button on the subform
(continuous) at the end of each record that when click will change the
mainform to the selected subform record. An example is if the mainform had
record 2 showing with record 20, 35, 46 showing in the subform, if I select
#35, the mainform no goes to that record.
Currently, the code I am attempting to use is the following;
Option Compare Database
Option Explicit
Dim recordnum As Long
Private Sub btnGoTo_Click()
recordnum = Forms![frmChangeRequestDetail].CurrentRecord
Forms![frmChangeRequestDetail].Requery
DoCmd.GoToRecord acDataForm, "frmChangeRequestDetail", acGoTo, recordnum
End Sub
What is occuring with this code is that nothing changes but the form(s) do
requery.
Can anyone assist on this?
Thanks... John