G
Glynn
My Receipts are processed through two linked forms - with heading data in the
MainFrm and allocations in the SubFrm - which is a Continuous form.
Selected MainFrm data is copied to the Allocations SubFrm by SETVALUE
functions which are triggered by the SAVE command - which is clicked after
all entries (and corrections) have been made. I need to flick backwards and
forwards between the two forms while entering the data. The number of
allocations is variable.
I have attempted to LOOP the SetValue Macros by including the following code
in the Save Command eg., for the Recpt No.:
Me.AllocSubFrm
DoCmd.RunCommand acSelectAllRecords
Do
DoCmd.RunMacro.SetVal_RcptNo
Loop While AllocSubFrm.[RcptNo] > 0
(I tried using .EOF but couldn't work out the code needed)
Above is not working - it updates only the very first record.
Other combinations I have tried resulted in the field being upddated in
every record - but the code kept running, out of control, requiring
Alt+Ctrl+Delete to stop.
I am not confident that the above code is anywhere near correct - and would
appreciate some guidance or example of how a Loop statement should be
constructed.
Glynn
MainFrm and allocations in the SubFrm - which is a Continuous form.
Selected MainFrm data is copied to the Allocations SubFrm by SETVALUE
functions which are triggered by the SAVE command - which is clicked after
all entries (and corrections) have been made. I need to flick backwards and
forwards between the two forms while entering the data. The number of
allocations is variable.
I have attempted to LOOP the SetValue Macros by including the following code
in the Save Command eg., for the Recpt No.:
Me.AllocSubFrm
DoCmd.RunCommand acSelectAllRecords
Do
DoCmd.RunMacro.SetVal_RcptNo
Loop While AllocSubFrm.[RcptNo] > 0
(I tried using .EOF but couldn't work out the code needed)
Above is not working - it updates only the very first record.
Other combinations I have tried resulted in the field being upddated in
every record - but the code kept running, out of control, requiring
Alt+Ctrl+Delete to stop.
I am not confident that the above code is anywhere near correct - and would
appreciate some guidance or example of how a Loop statement should be
constructed.
Glynn