| | |
|
|
|
Modifying Top Values Property in Query Automatically |
| message from =?Utf-8?B?RVdSSUdIVA==?= on 10 May 2004 |
Is there a way to use a macro/form/VBA to update the number in the top values property on a query, based upon another queries returned value? I am trying to return x number of records from a list table, but if that list table gets below x, then it will have to pull the difference between the remaining records and x from another list table.
|
| Allen Browne replied to =?Utf-8?B?RVdSSUdIVA==?= on 11 May 2004 |
dbEngine(0)(0).QueryDefs("MyQuery").SQL = "SELECT TOP " & SomeNumber & "...
|
| =?Utf-8?B?RVdSSUdIVA==?= replied to Allen Browne on 11 May 2004 |
Thanks for the response. I understand what you are saying and where to write the code (in the SQL view of the query). But, how do you do this automatically? Can you use a macro? And if so how?
|
| Allen Browne replied to =?Utf-8?B?RVdSSUdIVA==?= on 12 May 2004 |
No. This would need to be done in code, where you keep the entire SQL
statement in a string constand, and just tack the beginning bit on each time
before you run it.
|
| =?Utf-8?B?RVdSSUdIVA==?= replied to Allen Browne on 12 May 2004 |
Thanks for the input.
|
|
Archived message: Modifying Top Values Property in Query Automatically (Microsoft Access Database)