Hello everyone,
I am using a module in access to write a query. I first opened a connection to my database, and wrote my query in SQL in the module itself, then I have the following codes:
rs_Recordset.Op en Source:=sql, _
ActiveConnectio n:=o_Conn, _
CursorType:=adO penDynamic, _
LockType:=adLoc kReadOnly
And I'm not sure why I am getting the error message above. I am thinking...
User Profile
Collapse
-
Sathia1 replied to How do I use a where statement in a query to return one value from a column in a tbl?in SQL ServerThanks CK for this idea! I'll try, fingers crossed. -
Sathia1 replied to How do I use a where statement in a query to return one value from a column in a tbl?in SQL ServerThanks code green for your response. I did double check though and there is a field called month_id. I was earlier referencing the wrong database. My problem now is that once I run the query, I'm getting the error message "Operation is not allowed when the object is open". Any ideas about this one?? I would really appreciate any help I could getLeave a comment:
-
Sathia1 started a topic How do I use a where statement in a query to return one value from a column in a tbl?in SQL ServerHow do I use a where statement in a query to return one value from a column in a tbl?
Hello,
Here is my code and below is an explanation of what I think may be the reason why I am getting the error message "Invalid Column Name 'MONTH_ID'". Thanks for helping. I have no clue how to fix this.
Code:sql = "SELECT ACCUM_PLCY.MONTH_ID, PLCY_MASTER.INT_STRUCTURE_NBR, PLAN_CODE.PRODUCT_ACTUARIAL_CODE, ACCUM_PLCY.PLCY_DTE, ACCUM_PLCY.PLCY_ID, " & _ "EQUITY_FUND.FUND_ID, EQUITY_FUND.FUND_ALLOCATION_PCT,
No activity results to display
Show More
Leave a comment: