Oct 23, 2007 #1 szhang1988 Technical User Joined May 2, 2007 Messages 5 Location 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.
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.
Oct 23, 2007 #2 lespaul Programmer Joined Feb 4, 2002 Messages 7,083 Location US you mean in an existing table? Leslie In an open world there's no need for windows and gates http://www.ubuntu.com Upvote 0 Downvote
you mean in an existing table? Leslie In an open world there's no need for windows and gates http://www.ubuntu.com
Oct 23, 2007 Thread starter #3 szhang1988 Technical User Joined May 2, 2007 Messages 5 Location US yes, Leslie. The existing table was populated from a csv file. Upvote 0 Downvote
Oct 23, 2007 #4 MajP Technical User Joined Aug 27, 2005 Messages 9,382 Location US 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 Upvote 0 Downvote
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
Oct 23, 2007 Thread starter #5 szhang1988 Technical User Joined May 2, 2007 Messages 5 Location US Thanks much, majP. Beside this VBA, does MS Access have a built-in feature that provides the field count? Upvote 0 Downvote
Thanks much, majP. Beside this VBA, does MS Access have a built-in feature that provides the field count?