B
BG Lad
Hey y'all
How do I go about handleing the dynamic assignment of a recordsetclone?
Currently, in the 'called' form I am passing 2 parameters from various
different forms the first paramentes is "["+me.parent.name+"].["+me.Name+"]"
When I exit the form I would like to requery the calling (sub) form and
reposition the pointer to the edited record. As I am calling from different
forms I need to do something like this where lcForm2Open is dirived as
[parentname].[subformname]... however the subform ([Form_PMRT WBS Subform])
is the form I need to requery and re-point ...
.......snipped code.....
...
'* Requery the calling form *'
lcDoIt = "[Forms]!" + lcForm2Open + ".Requery"
Eval (lcDoIt)
'* Requery the calling form *'
lcDoIt = "[Forms]!" + lcForm2Open + ".Repaint"
Eval (lcDoIt)
'* Move the record pointer on the calling form to the correct position *'
(this is where I would like to replace
"[Form_PMRT WBS Subform].RecordsetClone"
with a variable like lcDoIt see above)
Set rs = [Form_PMRT WBS Subform].RecordsetClone
With rs
.Requery
If rs.RecordCount > 0 Then
rs.MoveLast
rs.MoveFirst
End If
rs.FindFirst ("[WBSID]=" + Trim(Str(lnRecordID2GoTo)))
...
......END OF snipped code.....
How do I go about handleing the dynamic assignment of a recordsetclone?
Currently, in the 'called' form I am passing 2 parameters from various
different forms the first paramentes is "["+me.parent.name+"].["+me.Name+"]"
When I exit the form I would like to requery the calling (sub) form and
reposition the pointer to the edited record. As I am calling from different
forms I need to do something like this where lcForm2Open is dirived as
[parentname].[subformname]... however the subform ([Form_PMRT WBS Subform])
is the form I need to requery and re-point ...
.......snipped code.....
...
'* Requery the calling form *'
lcDoIt = "[Forms]!" + lcForm2Open + ".Requery"
Eval (lcDoIt)
'* Requery the calling form *'
lcDoIt = "[Forms]!" + lcForm2Open + ".Repaint"
Eval (lcDoIt)
'* Move the record pointer on the calling form to the correct position *'
(this is where I would like to replace
"[Form_PMRT WBS Subform].RecordsetClone"
with a variable like lcDoIt see above)
Set rs = [Form_PMRT WBS Subform].RecordsetClone
With rs
.Requery
If rs.RecordCount > 0 Then
rs.MoveLast
rs.MoveFirst
End If
rs.FindFirst ("[WBSID]=" + Trim(Str(lnRecordID2GoTo)))
...
......END OF snipped code.....