Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.

  #1  
Old 04-26-2002, 09:26 AM
Propig
 
Posts: n/a
Default 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.
Reply With Quote
  #2  
Old 04-26-2002, 10:34 AM
Propig
 
Posts: n/a
Default 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
Reply With Quote
  #3  
Old 04-27-2002, 02:39 PM
wizbones wizbones is offline
Golden Techie
 
Join Date: Sep 2001
Location: Stayton, OR
Posts: 699
Send a message via Yahoo to wizbones
Default 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.
__________________
Wizbones PC
http://www.wizbonespc.com
--------------------------------------------------------
The Maximum Effective Range of an Excuse is Zero point Zero Meters!
Reply With Quote
  #4  
Old 04-29-2002, 08:40 AM
Propig
 
Posts: n/a
Default Re: Any Access or VB Experts

Anytime you need help......
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:00 PM. Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Forum style by ForumMonkeys.