The Aceman1 recently gave me some code to help with an issue that I was having which started as follows:
Being self taught and more by trial and error rather than formal teaching in MS Access I am not sure of the significance of the Dim frm as Form.
Can anyone point me in the direction of any information / tutorials on why and when I should Dim frm as Form and then setting the form.
Failing that, is anyone prepared to give me some guidance? Should I always Dim frm as Form? What happens when I have a form and nested and unnested subforms, do I have to dim them all? Does each Dim override the previous Dim? What is the benefit of Dimming? Sorry that there are so many questions but I am keen to find out more.
Code:
Private Function FilterMyForm()
Dim frm As Form, strFilter As String
Set frm = Me.frmIfSoilAnalResults.Form
Being self taught and more by trial and error rather than formal teaching in MS Access I am not sure of the significance of the Dim frm as Form.
Can anyone point me in the direction of any information / tutorials on why and when I should Dim frm as Form and then setting the form.
Failing that, is anyone prepared to give me some guidance? Should I always Dim frm as Form? What happens when I have a form and nested and unnested subforms, do I have to dim them all? Does each Dim override the previous Dim? What is the benefit of Dimming? Sorry that there are so many questions but I am keen to find out more.