N
Nova
My file is Access2003 contain of Table X (3 fields are ID,xx,yy)
This is my code in Form2
Private Sub Command15_Click()
Dim DBs As Database
Dim Rst As Recordset
Dim Strsql As String
Strsql = "Select xx from X where xx > forms!Form2.text0"
Set DBs = CurrentDb
Set Rst = DBs.OpenRecordset(Strsql, dbOpenDynaset, dbReadOnly)
Text13 = Rst.RecordCount
End Sub
when I click command15, I get message
Runtime error '3061'
Too few parameters Expected 1
and yellow hilight on Set Rst=.... Line
Where is it wrong
This is my code in Form2
Private Sub Command15_Click()
Dim DBs As Database
Dim Rst As Recordset
Dim Strsql As String
Strsql = "Select xx from X where xx > forms!Form2.text0"
Set DBs = CurrentDb
Set Rst = DBs.OpenRecordset(Strsql, dbOpenDynaset, dbReadOnly)
Text13 = Rst.RecordCount
End Sub
when I click command15, I get message
Runtime error '3061'
Too few parameters Expected 1
and yellow hilight on Set Rst=.... Line
Where is it wrong