I have this code which is producing a 'too few parameters Expected 1' error. Thanks for any help!
Code:
Dim CurDB As Database
Dim rs As recordset
Dim Resp As Integer
Set CurDB = CurrentDb
Set rs = CurDB.OpenRecordset("SELECT * from BatchMasterTemplateTable WHERE" & _
" ItemProduced =" & Me.ItemProduced)
If rs.RecordCount = 0 Then
rs.Close
Set rs = Nothing
Else
rs.MoveFirst
Do Until rs.EOF
If rs!TemplateDescription = Me.TemplateDescription Then
Resp = MsgBox("Template Description Already Exists for This Item!", _
vbOKOnly, vbExclamation, , "Template Description Already Exists!")
Cancel = True
End If
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End If