Category Archives: Development

Updating sub forms in MS Access

I had a request to do a simple update to a MS Access subform which should be easy enough but it can be tricky for new users to VBA to get the syntax correct. ┬áThe subform needed to be refreshed to ensure it has the current records, and then the number of records to be put on the label for the subform. ┬áHere is my solution –

Me.frmSubForm_Label.Caption = Me.frmSubForm.Form.RecordsetClone.RecordCount & " Records"