B
Boon
Hello,
I would appreciate if you would explain me what is the reason, or cause of
this....
I am using recordset in my vba code. I use ADODB.connection......
I am able to use this successfully, and I understand how it loop through the
records.
The problem I have is when I use this with one of my query. basically, I use
a code like < table.open "Query1" >
My output doesn't make sense based on the data in my Query1. It was like I
have 100 records in my Query1, but my output has 200 records. I was spending
hours to determine what's wrong and here is what I found out:
Fact: My Query1 is a select query based on several tables, and query. It is
not the most complicated one, but it is not a one step query from one table.
in my Query1 I have one criteria like this in field "NAME" --> not like
"B*". basically the Query1 selects everything with the name not starting
with B. when I open the query in Access, I see 100 records. my ADODB output
shows 200 records.
My solution: I adjusted the Query1 by not using "not like "B*". I use
left([NAME],1)
<>"B"
And this time the ADODB output shows 100 records which is correct.
Note that both queries how the same output in Access.
thanks,
Boon
I would appreciate if you would explain me what is the reason, or cause of
this....
I am using recordset in my vba code. I use ADODB.connection......
I am able to use this successfully, and I understand how it loop through the
records.
The problem I have is when I use this with one of my query. basically, I use
a code like < table.open "Query1" >
My output doesn't make sense based on the data in my Query1. It was like I
have 100 records in my Query1, but my output has 200 records. I was spending
hours to determine what's wrong and here is what I found out:
Fact: My Query1 is a select query based on several tables, and query. It is
not the most complicated one, but it is not a one step query from one table.
in my Query1 I have one criteria like this in field "NAME" --> not like
"B*". basically the Query1 selects everything with the name not starting
with B. when I open the query in Access, I see 100 records. my ADODB output
shows 200 records.
My solution: I adjusted the Query1 by not using "not like "B*". I use
left([NAME],1)
<>"B"
And this time the ADODB output shows 100 records which is correct.
Note that both queries how the same output in Access.
thanks,
Boon