E
Eoin Bairead
Hi - wierdo
here's some nice simple VBA Code to get Author & Title information from a
table in a database.
The 1st field in the table is Record Number, and that's the field that's
returned for EVERY firld requested.
In other words, Author & Title both return 1, then 2, then 3 and so on.
Any ideas where I could be going wrong.
I don't want to re-instal Office, but I will if I have to.
----------------------------------------------------------------------------------------
Set MyDataBase = CurrentDb
Set MyRecordSet = MyDataBase.OpenRecordset("Table")
With MyRecordSet
.MoveFirst
.MoveLast
End With
If MyRecordSet.RecordCount > 0 Then
With MyRecordSet
.MoveFirst
For totin = 1 To MyRecordSet.RecordCount
For ix = 1 To 30
If Not IsNull(MyRecordSet("Author")) Then
Ax = MyRecordSet("Author")
Else
Ax = ""
End If
Tx = MyRecordSet("Title")
End If
Next ix
if totin < MyRecordSet.RecordCount then .MoveNext
Next totin
End With
End If
here's some nice simple VBA Code to get Author & Title information from a
table in a database.
The 1st field in the table is Record Number, and that's the field that's
returned for EVERY firld requested.
In other words, Author & Title both return 1, then 2, then 3 and so on.
Any ideas where I could be going wrong.
I don't want to re-instal Office, but I will if I have to.
----------------------------------------------------------------------------------------
Set MyDataBase = CurrentDb
Set MyRecordSet = MyDataBase.OpenRecordset("Table")
With MyRecordSet
.MoveFirst
.MoveLast
End With
If MyRecordSet.RecordCount > 0 Then
With MyRecordSet
.MoveFirst
For totin = 1 To MyRecordSet.RecordCount
For ix = 1 To 30
If Not IsNull(MyRecordSet("Author")) Then
Ax = MyRecordSet("Author")
Else
Ax = ""
End If
Tx = MyRecordSet("Title")
End If
Next ix
if totin < MyRecordSet.RecordCount then .MoveNext
Next totin
End With
End If