Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Form with many text boxes USING CODE

Status
Not open for further replies.

daniels012

Technical User
Jan 19, 2005
55
US
I would like to create many text boxes on a form. I would like to know if I could write code that would create text boxes based on numbers I have in a table.
We have baseball players each has a number that reflects their age in this table. In this example of 7 year olds, Example: Joe Smith 701, Bob Johnson 702, etc.
I want to create a form that just has NUMBERS, say from 700 to 765. The numbers would only create the number based on the # of players in the table of that age group.
I started to do this by copying/pasting each text box one at a time, it will take forever, having to name each one, edit numbers, etc.etc.

I would like to create a form where I enter the age group... say 8 year olds and the form would look up in the players table all the 800's and create a form that has all those numbers.
Is this possible??

Thank You sooooooooooo Much,
Michael
 
Why not use a subform? It sounds like the results based on the selection will vary.

John Borges
 
Thank You for your quick response. I am going to use the form during the player draft. When there name gets picked it will become not visible.

Michael
 
What is the easiest way to create a form using code?
 
In the VBA help file take a look at the CreateControl method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I looked there. Didn't really have anything about creating a form.

Michael
 
In the VBA help file take a look at the CreateForm method too.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I thing there is a confusion with most the newcomers in MS Access. It happened to me also.
MS Access has two help files
[ul]
[li] Microsoft Access Help [/li]
One available in the normal window
[li] Microsoft Visual Basic Help [/li]
This available when you are in the code window[/ul] When some one say VBA help then it is the second one

hope this helps

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top