Hello, I want to connect to and external DB (on our own network)
I have succeeded in this, but am having trouble filtering and sorting the results
If I use the code:
If .RecordCount > 0 Then
rs.Filter = "[Type] LIKE '*" & StrTypeNeeded & "*'"
Set Me.Recordset = rs
Then I get all results. But adding in a SORT into this causes fewer restults to be returned. What is my problem?
If .RecordCount > 0 Then
rs.Filter = "[Type] LIKE '*" & StrTypeNeeded & "*'"
rs.Sort = "[date] desc"
Set Me.Recordset = rs
Also:
If I wanted to use an exact string rather than a LIKE, how would i phrase this:
I have definded StrTypeNeeded as a string variable
I have tried the below, but it errors
If .RecordCount > 0 Then
rs.Filter = "[Type] = StrTypeNeeded"
rs.Sort = "[date] desc"
Set Me.Recordset = rs
Thank you for any help
I have succeeded in this, but am having trouble filtering and sorting the results
If I use the code:
If .RecordCount > 0 Then
rs.Filter = "[Type] LIKE '*" & StrTypeNeeded & "*'"
Set Me.Recordset = rs
Then I get all results. But adding in a SORT into this causes fewer restults to be returned. What is my problem?
If .RecordCount > 0 Then
rs.Filter = "[Type] LIKE '*" & StrTypeNeeded & "*'"
rs.Sort = "[date] desc"
Set Me.Recordset = rs
Also:
If I wanted to use an exact string rather than a LIKE, how would i phrase this:
I have definded StrTypeNeeded as a string variable
I have tried the below, but it errors
If .RecordCount > 0 Then
rs.Filter = "[Type] = StrTypeNeeded"
rs.Sort = "[date] desc"
Set Me.Recordset = rs
Thank you for any help