D
Don
Hi all,
This is probably a simple question. I have a database of information and a
form that allows the user to specify the daterange and material that are
then passed to a query.
Unfortunately I have then got to select the table programatically as I
cannot find a "ALL tables" entry in the query designer window. These tables
are added and removed so I have a bit of code that searches for the tables
and adds them to a combo box.
Dim CurrentTablename
For Counter = 1 To Application.CurrentDb.TableDefs.Count - 1
CurrentTablename =
Application.CurrentDb.TableDefs.Item(Counter).Name
If Left(CurrentTablename, 4) <> "MSys" Then
Me.Material.AddItem CurrentTablename
End If
Next
this works !!! to get a list of meterials. I then want to run a query on the
material selected (TABLE selected).
(SELECT * from [Me.Material]) does not appear to work. Any thoughts or
hints?
Code snippets appreciated.
Donald Goodlad
Australia.
This is probably a simple question. I have a database of information and a
form that allows the user to specify the daterange and material that are
then passed to a query.
Unfortunately I have then got to select the table programatically as I
cannot find a "ALL tables" entry in the query designer window. These tables
are added and removed so I have a bit of code that searches for the tables
and adds them to a combo box.
Dim CurrentTablename
For Counter = 1 To Application.CurrentDb.TableDefs.Count - 1
CurrentTablename =
Application.CurrentDb.TableDefs.Item(Counter).Name
If Left(CurrentTablename, 4) <> "MSys" Then
Me.Material.AddItem CurrentTablename
End If
Next
this works !!! to get a list of meterials. I then want to run a query on the
material selected (TABLE selected).
(SELECT * from [Me.Material]) does not appear to work. Any thoughts or
hints?
Code snippets appreciated.
Donald Goodlad
Australia.