Dalorax
Registered User.
- Local time
- Today, 03:01
- Joined
- Aug 8, 2005
- Messages
- 12
I have the following code to access a table:
Dim strProduct As String
Dim rs As ADODB.Recordset
Dim intNum As Integer
Dim strSQL As String
strProduct = Me![ProductName]
Set rs = New ADODB.Recordset
strSQL = "[ProductName] = '" & strProduct & "'"
rs.Open "tblRMFG", CurrentProject.Connection, adOpenKeyset, _
adLockOptimistic, adCmdTable
With rs
.Find (strSQL)
If .RecordCount > 0 Then ...
Unfortunately the recordcount returns all records in this table "tblRMFG"
What have I missed here?
Dim strProduct As String
Dim rs As ADODB.Recordset
Dim intNum As Integer
Dim strSQL As String
strProduct = Me![ProductName]
Set rs = New ADODB.Recordset
strSQL = "[ProductName] = '" & strProduct & "'"
rs.Open "tblRMFG", CurrentProject.Connection, adOpenKeyset, _
adLockOptimistic, adCmdTable
With rs
.Find (strSQL)
If .RecordCount > 0 Then ...
Unfortunately the recordcount returns all records in this table "tblRMFG"
What have I missed here?