Extra_Cover
Registered User.
- Local time
- Today, 18:43
- Joined
- Oct 21, 2008
- Messages
- 71
Hi,
I have a problem returning to a record in a sub form. A user enters data in a subform Frm01FCData which has 12 periods - see attached screen dump. After a value has been entered the following After Update event is run to keep the PGroup value and the Product value so that after the requery the user will be returned to where they were.
Having looked at the link given in another thread I'm sure this should work. However I get the error message 'Can't find form Fm01FCData'.
Where am I going wrong?
I have a problem returning to a record in a sub form. A user enters data in a subform Frm01FCData which has 12 periods - see attached screen dump. After a value has been entered the following After Update event is run to keep the PGroup value and the Product value so that after the requery the user will be returned to where they were.
Code:
Private Sub P1_AfterUpdate()
Dim Product As String
Dim PGroup As String
PGroup = Me.Parent!pgdes_type
Product = Me.stck_stkno
' Update
Forms!Frm01PGList.Form.Requery
'Return to Selected Product Group
Forms!Frm01PGList.pgdes_type.SetFocus
DoCmd.FindRecord PGroup
'Return to Selected Product
Forms!Frm01FCData.stck_stkno.SetFocus
DoCmd.FindRecord Product
Me.P2.SetFocus
End Sub
Where am I going wrong?