In that case, you'd want an update of the Employees table limited to the Company you're currently viewing. Company ID exit Routine: Set db = Nothing Exit Sub err Handler: Msg Box Err. Because of that, a server like SQL Server will cache that query plan and be able to re-use it each time you execute the on-the-fly SQL, even if each time it has a different Company ID value.There are two ways to do that: Now, for the second part of it, you need to open the results form to display just those records that have been updated. Open Form "My Form That Displays The Results", , , "[Company ID] = " & Me! With a Jet/ACE back end, there is no caching like this, but the difference in execution time between the optimized and unoptimized SQL is going to be very small in all cases where you're not operating on really large datasets.
- wow addon list not updating
- camila grey and leisha hailey dating
- gratis medlemskab dating
- speed dating wien ab 18
The current answers explain how to display the results, but not how to run the query.
So, here's an answer based on my interpretation of the question.
First, create a continuous or datasheet form that is bound to the results. The "hard" part is executing the SQL to do the updates the results of which you're going to display.
How can I create a form that has a button to run the query and display the results in the same form, so that it looks more user friendly.
(the result is only 5 records of a two column table) I don't need a complete solution.
Just some advice on the code for the button and the space to display the result.
Based on the answers, I guess don't I understand the question.
You don't give any context for where you're launching this from, nor how you determine which particular records to update, so I'm going to give two fairly generic answers. create a macro with two parts: But this is all really begging the questions, as this is all pretty darned elementary.
The hard part of this kind of thing comes about when your SQL update is operating on a subset of records and you need to display only that subset of records. On Click()" Resume exit Routine My reason for constructing the SQL on the fly in the command button's On Click event is so that it's very easy to add in more criteria should they become necessary.