I can't figure out just what is causing this problem.
Here is the information:
First, the VBA code giving the error:
The line with the error is [HIGHLIGHT]highlighted[/HIGHLIGHT].
The error message:
Any clues as to what is causing the error?
Thanks for any suggestions.
--
"If to err is human, then I must be some kind of human!" -Me
Here is the information:
First, the VBA code giving the error:
The line with the error is [HIGHLIGHT]highlighted[/HIGHLIGHT].
Code:
Private Sub cboEndVerse_LostFocus()
Dim rst As Recordset, x As Long
Dim strSQL As String
Dim lngID As Long
Dim CR As String
Dim TB As String
Dim ctl As Control
CR = Chr(13)
TB = Chr(9)
strSQL = "SELECT COUNT(PassageID) AS 'Passages'" & CR & _
"FROM tblPassages" & CR & _
"WHERE (BookID = " & cboBook & ") AND " & CR & TB & _
"(BeginningChapter = " & cboBeginChapter & ") AND " & CR & TB & _
"(BeginninngVerse = " & cboBeginVerse & ") AND " & CR & TB & _
"(EndingChapter = " & cboEndChapter & ") AND " & CR & TB & _
"(EndingVerse = " & cboEndVerse & ")"
Debug.Print strSQL
[HIGHLIGHT]Set rst = CurrentDb.OpenRecordset(strSQL)[/HIGHLIGHT]
The error message:
Code:
Run-time error '3061':
Too few parameters. Expected 1.
Any clues as to what is causing the error?
Thanks for any suggestions.
--
"If to err is human, then I must be some kind of human!" -Me