Running of Update Queries when I open the Database

I need to be able to run an Update Query when the database is opened. I have the AutoExec macro already but the rest is what I need to figure out

Sponsored Links:

Related Topics

Running an update query
It seems there are many ways to skin a cat running SQL in VB. Here's my very basic question.

I have two update queries in my Access database. Query_Update_Avail and Query_Update_NotAvail. The queries simply set the value in a field to Yes or No indicating the line item is available or not. The queries work fine.

I have a checkbox on my form that when checked I would like to execute the Query_Update_Avail. When unchecked it would execute the Query_Update_NotAvail query. Both suppressing any warnings regarding "you are about to update X records"

I'm sure this is simple but I just need the syntax


Running Multiple Queries Simultaneously?
I need help with running multiple queries that are in relation to each other to perform one function, in addition to that, being able to use one parameter in those queries performing one function.

ATM I have to click each query and input the same parameter 2-3 times. It is quite painstaking to do. Everything in my database is functional, I just couldn't find a way to shortenit.

One function has different types of queries: Update, Append, and Delete.


Open form with subform No Update
I have built a form, with a field called ID and four subforms, each on its own page, each of which display a query based on ID. As it is now, when I open the form, it runs the 4 queries with the empty field, then when I update the ID field in the main form, all 4 queries run.
What I want is 1) to open the form with no queries running, giving chance to insert an ID in the main form
2) for each query to run only when its page is selected


running multiple update queries with one command, query, etc
people. I need urgent help.
I have many update queries in access 2003. I have to run all the times and I would to create SQL, VBA or combination of both to create a process where I can do this by just one query, button, function etc. I can't do this in a macro because the list of these update queries can increase or decrease at anytime and then I would have to update the macro. It defeats the purpose. All of these queries start with common name "0010 01."

I want something where it says look up queries if it starts with 0070 01 then Run it.
Using this following SQL

SELECT Name
FROM MSysObjects
WHERE Name Like "0010 01*";

I can come up with the list of queries but I am not sure how utilize this into VBA or anywhere else to automate the process to meet my requirements.
Like I said earlier I want something where it says look up queries if it starts with 0070 01 then Run it. I am open to other options if you have any


Database/Queries Running Very Slow?
I am making an Ms-Access database for Real Estate Management? I have succeeded in doing all that which is enlisted below, the problem is that the database is running very slow? I don't know what can I do now? The queries is running very slow thatmakes me to wait too much, I want to make the database run very fast?


Sharing an Access DB with multiple users
I created an access database for the sole purpose of sharing approved data with my entire company. The end users will view the data in a Form which utilizes several tabs and also gives them the ability to run pre-set queries out of the Form.

The Form was created using several queries which were built from tables off of the server. The tables update every day,

The problem I am running into is that it takes about 2 minutes to open the DB (the DB opens directly to the form and all queries run immediately to update), which is annoying to end users and might deter them from actually using the tool.

I have tried moving the DB to SharePoint, but that did not work due to the size of many of the tables.


Storing Information From Queries?
I'm working with a 1gb database and have about 20 queries that analyze and summarize the database in different ways. I tried running a separate query that runs all 20 of these queries, but it's just too much for my computer.

Is there a way to, maybe, write a macro that runs each query individually, and stores the result from each query? Any ideas on how to automate the running of these queries, and store the results?


Creating Action Queries - Update, Append and Delete Queries
Most Microsoft Access database users will use database queries to request or question information from one or more of your database tables. In Microsoft Access certain queries can also be used to change data as well as display or retrieve it.
These queries, defined as Microsoft Action queries, will allow the user to update data (Update Query), delete data (Delete Query) or add data from one database table to another (Append Query).


"Remote query" on DB open
I am trying automatize the update of several tables residing in a few different databases.

I would like to be able to open one database that then launches the update of several table creating queries in other databases.

My experience with vba for access is limited, so I was wondering if such a thing was possible


Problem with sharing use of Access database - will new version help?
We have three computers, one running Access 2007 (on Vista), one running Access 2003 (on Windows 7) and one also running Access 2003 (on XP).

The database we used is stored on the Vista computer and shared across a network.

We would like three users to be able to open the database at the same time, at least for read-only access. At the moment, when the Vista computer has the database open, the other two cannot open the database.

If one of the others opens it first, the Vista computer can open the database but cannot save changes.

When the Windows 7 or XP computers open the database file, they always get a "Do you want to open this file – Unknown publisher” warning, and need to click to continue. I have not beenable to resolve this issue by looking at permissions, etc.


How to run macro from another database?
I've desinged two database one for queries and another for report ( coz data was too big). I'm trying to open only report dbase, because most of the data from queries database after running all queries from the queries dbase.What I have done was trying to open only 1 dbase (report) run queries at the queries dbase. followling VB code I have tired.

Dim AppAccess As Object
' Create instance of Access Application object.
Set AppAccess = CreateObject("Access.Application")
'Open Service Desk KPI Metrics Queries.mdb database in Microsoft Access window.
AppAcsess.OpenCurrentDatabase "C:\Documents and Settings\ricop.dongol\My Documents\Service Desk KPI Metrics Queries.mdb", False
'False so as not to open in exclusive mode
AppAccess.Run "KPI1"
AppAccess.DoCmd.Minimize

Set AppAccess = Nothing

MsgBox "Done!"

after run command I received error msg object required?


Database Size?
I run a MS Access database monthly and I have been facing different issues every month. Here is some information about the database:
Source information loaded in my database comes from a text file (550 MB, 670,000 rows & 100 columns) extracted from Peoplesoft. There are 38 tables:

One table that stores all data. (670,000 records and 150 columns)
And additional 34 tables used to map data. The biggest ones have 74,000, 7,000, and 11,000.
There are 70 queries and 30 queries are Update queries that update the main table that contains all records.
This same database has 2 recorded macros. One of them runs all 26 update queries.

The columns have no primary key or indexes or an identifier that makes the record unique.
I also need to constantly compact and repair it.

Problem:
1) The macro takes 1:30 hours to run 26 update queries alone. It takes too long!
2) After this macro runs, some of the queries are successful and some are not but no error message is generated...


Working With Huge Databases?
I'm working with a 1gb database and have about 20 queries that analyze and summarize the database in different ways. I tried running a query that runs all 20 of these queries, but it's just too much to process.

Is there a way to, maybe, write a macro that runs each query, and stores the result from each query? Any ideas on how to automate the running of these queries, and store the results


Splitting DB; Keeping the Forms, Queries, Reports in BE
I am about to split the database I deployed recently. I was wondering if I could still keep the forms, queries, and reports in the back-end database, even if users will open these objects in the front-end.

Will my decision cause any troubles in the future? It is easier for me to update all the tables, queries, forms, and reports if the DB is just a single file, rather than if the DB is already split.


Splitting DB; Keeping the Forms, Queries, Reports in BE
I am about to split the database I deployed recently. I was wondering if I could still keep the forms, queries, and reports in the back-end database, even if users will open these objects in the front-end.

Will my decision cause any troubles in the future? It is easier for me to update all the tables, queries, forms, and reports if the DB is just a single file, rather than if the DB is already split.

Hope to get a reply.


Update .accde files with multiple users
I have a .accde file that I placed on my company website for supervisors to use to view tons of data. I need to update this database every morning from 0700-0730. I'm running into a problem, if there are any users in the database it will not allow me to update the file. This is a big problem because then I have to try and find out who has it open and ask them to close it before I can save the updates. Also is there anyway to set a timer of sorts to say Lock the database at 0700 and unlock at 0730? I have found some stuff on TWait = Time. Just need to know what I can do to make this database run smooth


Auto Run Macro
I'm using Access 2003

I have a database that I need to run once a week to refresh the tables via update queries. The tables are huge and its taking forever to run the queries when I get into work in the AM. I want to schedule the macros to run automatically and update the database in the middle of the night when no one is on the system so when I get in, my tables are up to date.
(The macro's to update the queries are all done and working. I just need to know the auto part


Name AutoCorrect Save Failures Table formed when importing queries
I'm trying to rebuild a database that became corrupted. Each time I try importing the queries from a previous copy of the database, I find this spontaneous table built of queries it says "Could not open the object" about.

I have gone in after linking tables and importing one query to uncheck the Name AutoCorrect in Access Options, but I still get this table.

If I open any of the queries this table lists, they open fine with the correct data inside.


Shared Database
I have an access database which is shared with 10-15 users. On a daily basis, I update the access database with excel data which changes everyday and then update the access database. I use VBA macro in excel to do that by updating the table in access i.e open connection to access, update/add new records in this access.

However when I update/add the access there might be a couple of people using it(they have the windows access Form open] and I get an error. I can only update if no-one is using the database. what should I do? I works fine if noone have the access form open on their computer. I cant call them everyday to close it before my update.

how to close the application[shut down the access form] of the other users before my update? if yes how to do it in VBA excel


Connecting to an Access Database using C#
This may seem like a common task, and it is, however I found it ridiculously difficult to learn how to do it. The MSDN website has articles on each class involved but nowhere does it explain how to put everything together. After reading this blog you should be able to: -Open a connection to an existing MS Access (.mdb) database.
-Perform SELECT queries.
-Extract the results from queries.
-Modify/Add row of a table.
-Update the changes to the Database.
-Close the connection.
-Figure out for yourself how to do other operations.