Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-03-2004, 08:41 AM   #1 (permalink)
 
Newb Techie

Join Date: Jun 2004

Posts: 10

techthis

Exclamation Select tables

hello...i have a program that get all of the tables in a db a lists them in a combobox...

is it possible to chose which tables are displayed in the combobox instead all of them???

if this helps, the tables i want displayed all have 2004 in the name , i.e. August2004, September2004, etc.

i thought i could do something like this

cmbTables.... = "*2004"

but this didn't worked...any ideas?....thanks for your time...
techthis is offline  
Old 09-03-2004, 09:14 AM   #2 (permalink)
 
Monster Techie

Join Date: Jul 2003

Posts: 1,179

Emily is on a distinguished road

Default

Well... you might have to re-structure your program to do it this way, but if you're using an ADO control, you can just change the record source in the code. (I think...)

What kind of data control are you using?
__________________
<a href=\"http://www.upstark.com\">www.upstark.com</a>
Emily is offline  
Old 09-03-2004, 09:22 AM   #3 (permalink)
 
Newb Techie

Join Date: Jun 2004

Posts: 10

techthis

Default

here is the connection im making...
Private Sub Form_Load()

con.Open "Provider=Microsoft.Jet.OLEDB.3.51;" & _
"Data Source=c:\test\test.mdb"

Set rs = con.OpenSchema(adSchemaTables)

Do While Not rs.EOF
cmbTables.AddItem rs("TABLE_NAME") 'ordinal index of 2
rs.MoveNext
Loop

End Sub

this retrieves all of the tables in the database...hope this helps...thanks for you time emily!
techthis is offline  
 
Closed Thread

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On