J
Jo
I dont know if this has already been posted on here, but i am really stuck
and have been searching for ages for an answer.
I have got a form where a customer would enter their membership number into
a textbox, when they hit the find button, i want the sql to find the record
that matches in the members table and put the results in the subform which
has specific textboxes for the different fields.
the code i have done is:
Dim db As Database
Dim recSetMember As Recordset
Dim sqlStatement As String
sqlStatement = "SELECT * from members where [members].[Member No] =
[Member_No]"
Set db = CurrentDb()
Set recSetMember = db.OpenRecordset(sqlStatement, , dbConsistent)
[members details].Visible = True
[recSetMember]![Title] = [members details]![Title]
at the moment it is throwing up an error when it gets to the :
Set recSetMember = db.OpenRecordset(sqlStatement, , dbConsistent)
please help.
Jo
and have been searching for ages for an answer.
I have got a form where a customer would enter their membership number into
a textbox, when they hit the find button, i want the sql to find the record
that matches in the members table and put the results in the subform which
has specific textboxes for the different fields.
the code i have done is:
Dim db As Database
Dim recSetMember As Recordset
Dim sqlStatement As String
sqlStatement = "SELECT * from members where [members].[Member No] =
[Member_No]"
Set db = CurrentDb()
Set recSetMember = db.OpenRecordset(sqlStatement, , dbConsistent)
[members details].Visible = True
[recSetMember]![Title] = [members details]![Title]
at the moment it is throwing up an error when it gets to the :
Set recSetMember = db.OpenRecordset(sqlStatement, , dbConsistent)
please help.
Jo