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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get MSAccess tables names in VB 1

Status
Not open for further replies.

suoirotciv

Programmer
Dec 3, 2002
205
PH
i need to populate in my combobox all table names using visual basic.

thank you in advance
 
(Just a note - this is really a vb question (not vbscript).)

Try this:
Code:
Dim tbl As TableDef

'loop through table names
For Each tbl In db.TableDefs
    'add to your combo box here
    cmbBox.AddItem tbl
Next tbl

Where db is the connection to the database where your tables are. I didn't test the line that adds to the combo box, just threw something together from some previous code I had!

Hope this helps!
dmh4ab
 
Thank You Very Much. I really works with me.

Sorry if i post this question here. I'm just a new VB programmer. I thought VBScript is just the same with VB.

So what actually is the different with VB and VBScript??? ePacific Global Contact Center
Manila, Philippines
 
No problem. Just glad to help. I still consider myself as new to vb programming!

Regarding the difference between vb and vbscript: (form
What is VBScript?
VBScript is a scripting language. A scripting language is a lightweight programming language. VBScript is a light version of Microsoft's programming language Visual Basic .
How Does it Work?
When a VBScript is inserted into a HTML document, the Internet browser will read the HTML and interpret the VBScript. The VBScript can be executed immediately, or at a later event.

[sunshine]
dmh4ab
 
Actually VBScript is much more than than a feature that can be used to create client-side interactive web pages.

Internet Explorer is just one of several standard Windows applications within which VBScript is embedded. Internet Information Server, recent versions of MS Office, and Windows itself through the WScript.exe and CScript.exe containers that are major parts of the Windows Script Host subsystem are some others.

You can even embed VBScript in your own projects, including VB projects. Or you can write whole desktop applications in VBScript using the HTA facility of IE.

The documentation on VBScript can be found at:

 
thanks 2 both of you . . . ePacific Global Contact Center
Manila, Philippines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top