G
George Papadopoulos
Hello everybody
I need to write code which will enable to access the specific fields of a
record. Specifically I`m using a Select query to pinpoint a single record.
Then I would like to access every field of that record. The code I`ve
written is :
Private Sub Form_Load()
Dim strSelect As String
Dim db As Database
Dim rsEpiskeyes As Recordset
If Not IsNull(Me.OpenArgs) Then
Me.Kwdikos_episkeyhs = Me.OpenArgs
End If
strSelect = "Select Kwdikos_texnikou, Kwdikos_mhxanhmatos,
Kwdikos_klinikhs, Hmeromhnia, Wra_enarjhs, Wra_lhjhs, Aitia_blabhs,
Katastash, Ek8esh_texnikou From EPISKEYH WHERE " & Kwdikos_episkeyhs & "=
Me.Kwdikos_episkeyhs"
' Open a connection to current database
Set db = CurrentDb()
' Open recordset satisfying criteria
Set rsEpiskeyes = db.OpenRecordset(strSelect)
End Sub
Firsty, the statement Set rsEpiskeyes = db.OpenRecordset(strSelect) fails.
Secondly, how can I access the fields of the first record in the recordset,
supposing the statement executes correctly (no syntax error).
thx, in advance
George Papadopoulos
I need to write code which will enable to access the specific fields of a
record. Specifically I`m using a Select query to pinpoint a single record.
Then I would like to access every field of that record. The code I`ve
written is :
Private Sub Form_Load()
Dim strSelect As String
Dim db As Database
Dim rsEpiskeyes As Recordset
If Not IsNull(Me.OpenArgs) Then
Me.Kwdikos_episkeyhs = Me.OpenArgs
End If
strSelect = "Select Kwdikos_texnikou, Kwdikos_mhxanhmatos,
Kwdikos_klinikhs, Hmeromhnia, Wra_enarjhs, Wra_lhjhs, Aitia_blabhs,
Katastash, Ek8esh_texnikou From EPISKEYH WHERE " & Kwdikos_episkeyhs & "=
Me.Kwdikos_episkeyhs"
' Open a connection to current database
Set db = CurrentDb()
' Open recordset satisfying criteria
Set rsEpiskeyes = db.OpenRecordset(strSelect)
End Sub
Firsty, the statement Set rsEpiskeyes = db.OpenRecordset(strSelect) fails.
Secondly, how can I access the fields of the first record in the recordset,
supposing the statement executes correctly (no syntax error).
thx, in advance
George Papadopoulos