I am having trouble getting my ado to bring up records from an SQL server data base based on a search for a perticular password.
I know the connection is good becuase I can get the ado to load text boxes when the form loads but when I code the record source to call up a record based on a known password, the ado dims out and no records return.
I have a feeling the ptoblem is syntax but I have used this structure before, with no trouble.
The password field in the table tblCust is nvarchar (100) and the passwords are input as numbers and letters.
Here is the code that I have tried.
Private Sub Command1_Click()
frmListing.adoAccess.RecordSource = "SELECT * FROM tblCust WHERE Password = '" & Text2.Text & "' "
frmListing.adoAccess.Refresh
End Sub
Any help will be appreciated.
Regards,
Dwight
I know the connection is good becuase I can get the ado to load text boxes when the form loads but when I code the record source to call up a record based on a known password, the ado dims out and no records return.
I have a feeling the ptoblem is syntax but I have used this structure before, with no trouble.
The password field in the table tblCust is nvarchar (100) and the passwords are input as numbers and letters.
Here is the code that I have tried.
Private Sub Command1_Click()
frmListing.adoAccess.RecordSource = "SELECT * FROM tblCust WHERE Password = '" & Text2.Text & "' "
frmListing.adoAccess.Refresh
End Sub
Any help will be appreciated.
Regards,
Dwight