SriKumar
I can understand your pain about being "locked" into a poorly designed database; however, every momement that you spend to get that db into a normalized form will pay you back at least a hundred fold!
In the mean time please start with the following:
http://support.microsoft.com/kb/210362 Yes, it's for MSA2000; however, it still applies.
and
- Sub FieldNames()
-
Dim zrs As Recordset
-
Dim zfld As Field
-
'
-
'establish the recordset
-
Set zrs = CurrentDb.OpenRecordset("YourTableNameHere")
-
'
-
'step thru the field names in the open table
-
For Each zfld In zrs.Fields
-
MsgBox (zfld.Name)
-
Next
-
'
-
'cleanup
-
zrs.Close
-
Set zrs = Nothing
-
End Sub
DON'T ASK ME WHY I HAVE THAT JUST SITTING AROUND... yep... I had a DB that was not normalized... not anymore! Over 5 years of data in that monster and the tables were monsters! It's "fixed" now and I don't regret the time I spent on it at all!
-z