![]() |
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. |
Re: Any Access or VB Experts
Doh! I got it! It was so easy.
For Each fld In frst.Fields Set ctlText = CreateControl("frmvalidationfile", acTextBox, acDetail, , fld.Name) ctlText.Name = fld.Name Next |
Re: Any Access or VB Experts
Propig,
WTG, ::) I love seeing a post and answer both from the same person. It's amazing. Glad you figured it out so quickly, sometimes just writting it out it just screams at you "Here I am". Someday maybe I'll learn this stuff but for now I'll leave it to you and just learn bits n pieces from your posts. |
Re: Any Access or VB Experts
Anytime you need help......
|
| All times are GMT -5. The time now is 10:29 AM. |
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.