Any Access or VB Experts
I am able to create and populate controls based on a recordset. But when you open the form in datasheet view the Column headers show as Text0, Text1, etc.
Can I specify the name of the textbox at the time I create it? I would like the name of the textbox be fld.name
Here is my code
For Each fld In frst.Fields
Set ctlText = CreateControl("frmname", acTextBox, , , fld.Name)
Next
Yes, I could create labels for the text boxes, but then I have to also place them in the correct spot on the form. Since the fields that are shown on the form can be as few as two or up to 10 or more and they can vary greatly in size, I do not think this is the best option.
If anyone knows a better way of doing this I am all ears! Thanks in advance for any assitance.
|