J
Jean-Paul De Winter
When I run the sql in following code I get 4 records (which is
correct)
When I check the "recordcount" it seems like TB only has 1 record
What am I doing wrong?
Thanks
Dim db As Database
Dim TB As Recordset, TB_UITPINT As Recordset
Dim TB_filt As String
Set db = CurrentDb()
Set TB_uitprint = db.OpenRecordset("UITPRINTRAPPORTEN",
dbOpenTable)
TB_filt = "SELECT Rapport.Naam, Rapport.Periode FROM Rapport WHERE
((Rapport.Naam)='Baeyens Roel') AND ((Rapport.Periode)='Maart -
April'));"
Set TB = db.OpenRecordset(TB_filt)
If TB.RecordCount <> 0 Then
End If
TB.MoveFirst
Do Until TB.EOF
TB_uitprint.AddNew
TB_uitprint!naam = TB!naam
TB_uitprint!Periode = TB!Periode
TB.MoveNext
Loop
TB_uitprint.Update
correct)
When I check the "recordcount" it seems like TB only has 1 record
What am I doing wrong?
Thanks
Dim db As Database
Dim TB As Recordset, TB_UITPINT As Recordset
Dim TB_filt As String
Set db = CurrentDb()
Set TB_uitprint = db.OpenRecordset("UITPRINTRAPPORTEN",
dbOpenTable)
TB_filt = "SELECT Rapport.Naam, Rapport.Periode FROM Rapport WHERE
((Rapport.Naam)='Baeyens Roel') AND ((Rapport.Periode)='Maart -
April'));"
Set TB = db.OpenRecordset(TB_filt)
If TB.RecordCount <> 0 Then
End If
TB.MoveFirst
Do Until TB.EOF
TB_uitprint.AddNew
TB_uitprint!naam = TB!naam
TB_uitprint!Periode = TB!Periode
TB.MoveNext
Loop
TB_uitprint.Update