joltremari
Registered User.
- Local time
- Today, 20:17
- Joined
- Jun 4, 2001
- Messages
- 24
When I tried this code to loop through the records to clear the data, it added about 3,700 records to the table, now I don't know how I'm going to get all those records out, but more importantly I don't not know why this code is not working. If someone could take a look at it and maybe figure out why it did wrong I would greatly appreciate it.
Code:
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM 2006TalentShow"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSQL, dbOpenDynaset)
Do Until rst.EOF = True
'On Error GoTo Err
Forms![frm2006TalentShow]![TypeActAdult] = ""
Forms![frm2006TalentShow]![curTypeAct] = ""
Forms![frm2006TalentShow]![TypeActGospelYouth] = ""
Forms![frm2006TalentShow]![TypeActGospelAdult] = ""
Forms![frm2006TalentShow]![curEntered] = ""
Forms![frm2006TalentShow]![Payment] = ""
Forms![frm2006TalentShow]![curYouth] = ""
Forms![frm2006TalentShow]![curAdult] = ""
Forms![frm2006TalentShow]![curGospel] = ""
Forms![frm2006TalentShow]![curGospelYouth] = ""
NextRecord_Click 'clickevent of next record button
Loop
Set rst = Nothing
Set dbs = Nothing
End Sub