Guys i am struggling with my Check box to select all records in subform.
The code i have is below,
The Field names Delivery is a short text field, but i get error message 3464 - data type Mismatch in Criteria Expression.
if I run it as query it works, just not when i run as VB
my debug.print code produces
UPDATE Temp_Deliveries_Last_30 SET Temp_Deliveries_Last_30.In_Group = True WHERE (((Temp_Deliveries_Last_30.Delivery_reference)=01092712))
Please help.
The code i have is below,
The Field names Delivery is a short text field, but i get error message 3464 - data type Mismatch in Criteria Expression.
if I run it as query it works, just not when i run as VB
my debug.print code produces
UPDATE Temp_Deliveries_Last_30 SET Temp_Deliveries_Last_30.In_Group = True WHERE (((Temp_Deliveries_Last_30.Delivery_reference)=01092712))
Code:
Dim strsql0 As String
Dim strsql1 As String
Dim strsql2 As String
Dim strsql3 As String
Dim strsql4 As String
strsql1 = "UPDATE Temp_Deliveries_Last_30 SET Temp_Deliveries_Last_30.In_Group = True "
strsql2 = "WHERE (((Temp_Deliveries_Last_30.Delivery_reference)="
strsql3 = [Forms]![FrmNonConformanceNew]![CboxDelRef]
strsql4 = "))"
strsql0 = strsql1 & strsql2 & strsql3 & strsql4
Debug.Print strsql0
CurrentDb.Execute strsql0
Please help.