By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,500 Members | 830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,500 IT Pros & Developers. It's quick & easy.

Query to Build List of Existing Fields in a Table

P: n/a
This may sound silly, but is it possible to build a query to generate a list
of fields in a given table?
TIA

Joe
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Assuming you've got a reference set to DAO, something like:

Dim dbCurr As Database
Dim tdfCurr As TableDef
Dim fldCurr As DAO.Field

Set dbCurr = CurrentDb()
Set tdfCurr = dbCurr.TableDefs("MyTable")

For Each fldCurr In tdfCurr.Fields
Debug.Print fldCurr.Name
Next fldCurr

Set tdfCurr = Nothing
Set dbCurr = Nothing

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

"Joe User" <jo*@user.com> wrote in message
news:bu**********@tribune.mayo.edu...
This may sound silly, but is it possible to build a query to generate a list of fields in a given table?
TIA

Joe

Nov 12 '05 #2

P: n/a
On Fri, 16 Jan 2004 14:46:31 -0700 in comp.databases.ms-access, "Joe
User" <jo*@user.com> wrote:
This may sound silly, but is it possible to build a query to generate a list
of fields in a given table?


Is this to display in a combo box? If so then set the RowSourceType to
"field List" and the Rowsource to the name of the table.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.