A real begineer
Registered User.
- Local time
- Today, 22:23
- Joined
- Nov 4, 2000
- Messages
- 74
Having not done a lot with SQL I thought it easiest to create a query and copy the code into code. The question is that when I run the query, the code goes to the appropriate record, but the code below only brings up the first record. Is there some other step I am missing?
Private Sub Form_Load()
Dim strSQL As String
strSQL = "SELECT tblCPoolDetails.*, tblCPoolDetails.HomePhone" _
& "FROM tblCPoolDetails" _
& "WHERE (((tblCPoolDetails.HomePhone)=[Forms]![frmClientDetail]![txtHP]));"
End Sub
I have tried closing frmClientDetail after this code has run, or before neither variation seemed to remedy the problem.
Private Sub Form_Load()
Dim strSQL As String
strSQL = "SELECT tblCPoolDetails.*, tblCPoolDetails.HomePhone" _
& "FROM tblCPoolDetails" _
& "WHERE (((tblCPoolDetails.HomePhone)=[Forms]![frmClientDetail]![txtHP]));"
End Sub
I have tried closing frmClientDetail after this code has run, or before neither variation seemed to remedy the problem.