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

# of fields in Access 2003 table

Status
Not open for further replies.

szhang1988

Technical User
May 2, 2007
5
US
Hi, I'm really realy new to MS Access. I try to find out how many fields in a table. is there a way to do that?

Thanks a bunch in advance.
 
yes, Leslie. The existing table was populated from a csv file.
 
if the table is in the current db then.
Code:
Public Function getFieldCount(strTblName As String) As Integer
  getFieldCount = CurrentDb.OpenRecordset(strTblName).Fields.count
End Function
 
Thanks much, majP. Beside this VBA, does MS Access have a built-in feature that provides the field count?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top