I am wanting to run a query in vba but I don't want it to open. However, i use docmd.openquery "name", , acreadonly this query just to select some of records and I don't want it to open and viewed on running
I am wanting to run a query in vba but I don't want it to open. However, i use docmd.openquery "name", , acreadonly this query just to select some of records and I don't want it to open and viewed on running
SELECT queries don't need to be 'run'. There is no way to execute OpenQuery and not open the query.
Exactly what are you trying to accomplish?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I have a set of queries run one after another, the first query to select records from main table and write it to another and the second just select and update operator and the last one to return the max and min from the above.
Why do you need to write records to another table?
I don't use saved action query objects. I do SQL actions in VBA.
Again, SELECT queries do not need to be 'run'. Just the action queries.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I use select query to select all users who have more than one crop then move it to another table and so on ...
I was used sql with vba in code procedure but my code source too big and the cursor stop at line82 , column 1024 so I can't continue, so and because that reason i write it in query sql and call it from vba...
I don't understand 'code source too big'. Never encountered this. Code can be wrapped onto multiple lines with continuation character: _
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Me too, I don't know why I can't continue to write my code..
Without viewing code, can't even try to determine cause.
So is your issue resolved? Don't open SELECT queries.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Ooh you are right , i dont need select query ... Thanks