sambrierley
Registered User.
- Local time
- Today, 07:31
- Joined
- Apr 24, 2014
- Messages
- 56
hi all,
i would of thought this was dead easy.
can anyone provide the syntax for vba to create a userform with a variable as the source?
i dont want anything fancy simply replicate opening a table and clicking the form button.
thanks
quick edit - p.s i can use this to create a form with the source, im sorry what im after is all of the columns in the source being put into the form. the tables change and i dont fancy making a form for each hence the requirement.
<CODE>
Sub NewForm()
Dim frm As Form
'Create a new form based on the XXXXX form
Set frm = CreateForm(, "192_csv")
DoCmd.Restore
frm.RecordSource = "192_csv"
End Sub <CODE>
i would of thought this was dead easy.
can anyone provide the syntax for vba to create a userform with a variable as the source?
i dont want anything fancy simply replicate opening a table and clicking the form button.
thanks
quick edit - p.s i can use this to create a form with the source, im sorry what im after is all of the columns in the source being put into the form. the tables change and i dont fancy making a form for each hence the requirement.
<CODE>
Sub NewForm()
Dim frm As Form
'Create a new form based on the XXXXX form
Set frm = CreateForm(, "192_csv")
DoCmd.Restore
frm.RecordSource = "192_csv"
End Sub <CODE>