The issue is based on this code below:
----- start of function code -----
Public Function LimitRecords( _
frm As Access.Form, _
Optional RecLimit As Integer = 1)
' Limit the number of records in the form passed as
' to no more than the number specified by .
With frm.RecordsetClone
If .RecordCount <> 0 Then .MoveLast
frm.AllowAdditions = (.RecordCount < RecLimit)
End With
End Function
'----- end of function code -----
=LimitRecords([Form], 1)
Because of using this code to limit the number of lines to be used in the sub form, though everything works fine but after saving data it does not refresh in readiness for the new data entry until I close the form and reopen again that is when it work again.
I have tried to use this code:
Me.Requery
In the sub form, well it has worked but it save directly immediately once the last control is done leaving the parent form data un saved. It does not give chance for corrections
Temporally I have now resorted to us the VBA code below:
Private Sub Refresh_Click()
DoCmd.Save
DoCmd.Close
End Sub
This now works Okay, but I have to keep on reopening until all transactions are finished
(2) Is there way to refer to a control from a subform to the other subform like the we do it when referring to the parent form:
Me.TTDate = Me.Parent!TTDate
Any help on this will be high appreciated.
Regards
Chris
Open in new window
(Where OtherChild is the name of the 'sibling' subform control, as seen in the parent form's design)