If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Selecting Tables In Access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-10, 16:20
PJHAction PJHAction is offline
Registered User
 
Join Date: Apr 2008
Location: All over, Now in Missouri
Posts: 65
Selecting Tables In Access

I am using the Median Form/Code from Microsoft to get my Median stats. The Code Selects all the Tables from my Access DB which is ok, but I want it to select only tables that start with "Median".

How do I change this code to look at the Tables and only return those meeting "Median*"?

Private Sub Form_Load()
' Fill the list of tables.
Dim tdf As TableDef
cboTable.RowSourceType = "Value List"
For Each tdf In CurrentDb.TableDefs
If Not (tdf.Attributes And dbSystemObject) <> 0 Then
If Left$(tdf.Name, 4) <> "~tmp" Then
cboTable.AddItem tdf.Name
End If
End If
Next tdf
End Sub

Peter
__________________
We tend to look at Linear paths which can lead us to a path of resistance!
Reply With Quote
  #2 (permalink)  
Old 03-30-10, 19:13
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
which version of VB?
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

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

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