G
George Papadopoulos
I have written the code below, for the Load of a form I am creating. The
form is being opened by another form, which passes it a long integer
parameter.
Private Sub Form_Load()
Dim dbEPEMBATHS As Database
Dim rsSpares As Recordset
Dim Kwdikos As Long
Dim objvar As Object
If Not IsNull(Me.OpenArgs) Then
Kwdikos = Me.OpenArgs
End If
' Set dbLib to the current database
Set dbEPEMBATHS = CurrentDb
' Create a query
strselect = "Select * FROM ANTALLAKTIKA WHERE
[ANTALLAKTIKA].Kwdikos_episkeyhs = Me.OpenArgs "
[Spares_List].RowSource = strselect
End Sub
The code works, but the SQL statement returns all records of
table"ANTALLAKTIKA" instead of limited recordset by use of the WHERE clause.
How can I express this SQL statement correctly.
George Papadopoulos
form is being opened by another form, which passes it a long integer
parameter.
Private Sub Form_Load()
Dim dbEPEMBATHS As Database
Dim rsSpares As Recordset
Dim Kwdikos As Long
Dim objvar As Object
If Not IsNull(Me.OpenArgs) Then
Kwdikos = Me.OpenArgs
End If
' Set dbLib to the current database
Set dbEPEMBATHS = CurrentDb
' Create a query
strselect = "Select * FROM ANTALLAKTIKA WHERE
[ANTALLAKTIKA].Kwdikos_episkeyhs = Me.OpenArgs "
[Spares_List].RowSource = strselect
End Sub
The code works, but the SQL statement returns all records of
table"ANTALLAKTIKA" instead of limited recordset by use of the WHERE clause.
How can I express this SQL statement correctly.
George Papadopoulos