belovedcej
Programmer
Following gives me an error at Call_Attorney_ID. It is a variable that has been declared earlier in the sub.
Is there another way I should not it since it is a variable and not a column in the sql statement?
Dim rst2 As ADODB.Recordset
Set rst2 = New ADODB.Recordset
rst2.ActiveConnection = CurrentProject.Connection
rst2.Open "SELECT Deleted_B FROM dbo.MED_Attorneys_T WHERE Attorney_ID = Call_Attorney_ID"
If "rst2" = "0" Then
MsgBox "Deletion failed. Record in use.", vbOKOnly
Else
Me.Requery
MsgBox "Deletion has been completed", vbOKOnly
End If
Is there another way I should not it since it is a variable and not a column in the sql statement?
Dim rst2 As ADODB.Recordset
Set rst2 = New ADODB.Recordset
rst2.ActiveConnection = CurrentProject.Connection
rst2.Open "SELECT Deleted_B FROM dbo.MED_Attorneys_T WHERE Attorney_ID = Call_Attorney_ID"
If "rst2" = "0" Then
MsgBox "Deletion failed. Record in use.", vbOKOnly
Else
Me.Requery
MsgBox "Deletion has been completed", vbOKOnly
End If