Can someone look at this and tell me why I am getting the


No value given for one or more required parameters error
__________________________________________________ ___
Dim Locked As Boolean
'Create connection
Dim cnn2 As ADODB.Connection
Set cnn2 = CurrentProject.Connection
Dim lockRecordSet As New ADODB.Recordset

lockRecordSet.ActiveConnection = cnn2
lockRecordSet.Open "SELECT lockInd AS Locked FROM dwgTbl WHERE partnum=Forms![DWG FORM]!txtPartNum;"

Answer = Locked
'Check status of part
If Locked = True Then
MsgBox "Part currently locked for ECO", vbInformation, "Part Update Error"
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End If