I have a query in which the values in one column are defined by the following formula:
Compliane: IIf([OPCControl].[OPC Assertions] Like "*Compliance*","Yes","No")
When I run this query in access I get the correct value of Yes/No where applicable.
However, if I use the following code in my macro:
Dim rst As New ADODB.RecordSet
rst.Open strQuery, CurrentProject.Connection (where strQuery is the name of my query)
x1Ws.Cells (2,1).CopyFromRecordset rst
I always get No in this column.
Why is this happening?
FYI.... x1Ws is an excel application object.
Compliane: IIf([OPCControl].[OPC Assertions] Like "*Compliance*","Yes","No")
When I run this query in access I get the correct value of Yes/No where applicable.
However, if I use the following code in my macro:
Dim rst As New ADODB.RecordSet
rst.Open strQuery, CurrentProject.Connection (where strQuery is the name of my query)
x1Ws.Cells (2,1).CopyFromRecordset rst
I always get No in this column.
Why is this happening?
FYI.... x1Ws is an excel application object.