Hi,
I have the following insert into statement:
The problem I have is the original RS data are short text fields and all contain either a 0 or a -1 where as my new table data are Yes/No fields. So what I need to do is amend the statement above to check each of the above variables and convert them to a True/False.
As an example I have tried amending it to the following:
& If(RS!FireSupplyCheck)=""-1"",True,False) & ", " _
Or
& If(RS!FireSupplyCheck)=""-1"",-1,0) & ", " _
But I get errors - can anyone where I have gone wrong?
I have the following insert into statement:
Code:
Dim RS As DAO.Recordset
Set RS = CurrentDb.OpenRecordset("SELECT * FROM OrdersCheckBoxes")
RS.MoveLast
RS.MoveFirst
Do Until RS.EOF
If RS!FireCheckBox = True Then
CurrentDb.Execute "INSERT INTO tblOrdersDisciplines (ChkSupply, DateX) VALUES (" _
& RS!FireSupplyCheck & ", " _
& "Date())"
End If
RS.MoveNext
Loop
Set RS = Nothing
The problem I have is the original RS data are short text fields and all contain either a 0 or a -1 where as my new table data are Yes/No fields. So what I need to do is amend the statement above to check each of the above variables and convert them to a True/False.
As an example I have tried amending it to the following:
& If(RS!FireSupplyCheck)=""-1"",True,False) & ", " _
Or
& If(RS!FireSupplyCheck)=""-1"",-1,0) & ", " _
But I get errors - can anyone where I have gone wrong?