J
J.J. Lenlo
I want to count the number of fields in the Bank Deposits record. It did not
work on the upgrade. I have been guessing at code for 8 days so this is what
I have at the moment.
Dim tblName As String
Dim fldName As Field
Dim rst As Recordset
Dim tdf As TableDef
Dim db As Database
Dim fldCnt As Byte
Set db = CurrentDb
With db
fldCnt = 0
For Each tdf In .TableDefs
If Left(tdf.Name, 11) = "AlphaErrors" Then
tblName = Left(tdf.Name, 11)
fldCnt = db.TableDefs!tblName.Fields.Count '
Error on this line!
MsgBox "Found Errors Table"
End If
Next tdf
End With
Any help appreciated.
J.J.
Confuson leads to guessing. Guessing is like playing Russian Roulette.
Rutherford B. Hayes 23 President of the US
work on the upgrade. I have been guessing at code for 8 days so this is what
I have at the moment.
Dim tblName As String
Dim fldName As Field
Dim rst As Recordset
Dim tdf As TableDef
Dim db As Database
Dim fldCnt As Byte
Set db = CurrentDb
With db
fldCnt = 0
For Each tdf In .TableDefs
If Left(tdf.Name, 11) = "AlphaErrors" Then
tblName = Left(tdf.Name, 11)
fldCnt = db.TableDefs!tblName.Fields.Count '
Error on this line!
MsgBox "Found Errors Table"
End If
Next tdf
End With
Any help appreciated.
J.J.
Confuson leads to guessing. Guessing is like playing Russian Roulette.
Rutherford B. Hayes 23 President of the US