I have a 16Mb DB. The intention is for users to access this over the network without copying onto their local machines.
At present, many of the forms are located on 1 master form and they are all subforms on tabs. There are a lot of calculated control boxes on the forms, and these seem to be very slow to bring back the data over the network whereas on my local machine, the data is displayed in a couple of seconds.
COuld this be sped up somehow? Maybe using queries or other methods?
This problem is driving me nuts!! I`ve just spent a fair few months creating a database to be used by our sales team, I`ve about finished it and came to trial it with the sales manager. When he is using the database at the same time as me it becomes slow. The design has a front end with all the queries, forms etc and a back end on a server containing the tables. The database was created using Access 2000 and was designed to replace a similair db created on 97 which has a decent speed on the network. The other strange thing is that one particular macro that I`ve been using for the speed tests runs quite slow (about 3 secs) when 2 pcs have the db open but once the macro has run if it is run again it takes typically less than a second to run. What would cause a db to run a macro at different speeds after they`ve been run once? I`ve tried everything I can find on the net to try and improve the speed to no avail. Help please!!
Hello, I have split a database useing the database spliter wizard. But I still have network speed problems. What I am wondering is if anyone knows if useing an ODBC connection between the front and back ends is more efficient than file sharing across the network? Thanks for any information on this Tim
Hi guys. I am stumped with a 45 second delay when I startup my application. I get the delay on networked workstations only when another workstation is up showing the Main "switchboard" form. Each workstation has their own copy of VBA (not compiled) with networked versions having linked tables to the server's .mdb
It seems like the workstations know that the main form is up somewhere else and need to negotiate with it. All have the (Access 2000) Default open mode to Shared, Default record locking to No Locks, and Open database using record-level locking On. :confused:
I have a couple of acces databases running on a peer to peer network (database A and B, which are housed on PC1). The database B has a link to a Customer table in database A. This was running fine until another user on the peer to peer network wanted to use database B on their pc (PC2). I had to change the the file location of the linked table to show it's location on the network so PC2 could open it. Unfortunatley this greatly slowed the operation of the database B on both machines. If anyone has made it this far - Is there any way round this?
I have completed a database for a company with 60 000 clients and over 100 000 job records.
The database works at very resonable speeds on the Server computer, or the computer on which I installed the back end of the database.
Each of the other 3 computers on the wireless network, have a local copy of the Front End on their machine, and reference the Back End (BE) on the server computer.
Each of the Client computers have varing speeds when accessing the BE, some as slow as 10 minutes for a simple search, filter or just loading a form.
What can I do to improve performance across the network?
Do I need to install additional components on the other computers to improve the db performance?
I'm having trouble with access. Basically it has been very slow to load (over 30 seconds when not opening a database) and when opening a database it just crashes.
Has anyone any idea what could cause this as it worked fine before ?
Dear pro, I am having difficulties running a simple query that it runs all day and I have to kill it at the end of my date because it does not finish. Here is the statement that I would like some suggestions on how to improve it for faster results: SELECT code, acct nbr, date, user, sum(amt) FROM Tbl a WHERE code IN ('AB', 'BC', 'CD', 'AA', 'BB', 'CC', 'ZZ' ) AND date BETWEEN TO_DATE ('20070101', 'YYYYMMDD') AND TO_DATE ('20070131', 'YYYYMMDD') group by code,acc nbr,date,user
I have a table with a rotating work order number (from 1 to 9999 then starts over) and because there may be more than one record with the same work order number I need to find the most recent one. Here's the query I'm using the find the most recent record for each work order number: SELECT * FROM [Work Orders] AS wk1 WHERE NOT EXISTS( SELECT * FROM [Work Orders] AS wk2 WHERE wk1.[Work Order #] = wk2.[Work Order #] AND wk1.[Call In Date] < wk2.[Call In Date] );
Right now the table has a litttle over 10000 records and it takes anywhere from 10 seconds to 60 seconds to return the results. Is there a way I could possibly speed up this query?
I have create my first program. When you click on the program it runs (I am an expert now!) But when I want it to run, I want it to hide the toolbars on the top so no one can alter it. Any suggestion?
I have a report with several subreports which run agains a very large table. If I decide to print the report after examining it, all of the underlying queries must run again. Is there any way around this to avoid this delay, other than exporting as rtf or snp?
I have 6 combo boxes on a form, which call a report based on a query. The idea is that the user can query data 6 different way. How do I/ or the user know which one is actually running first. Would the order left to right make a difference? (None have sort ascending or descending)
I own a kennel and was wondering if there is a way to put in 2 different dates and get totals of animals during that time and totals of kennel runs? Thanks.
Sorry, my reservation table includes Kind, New (y/n), Owner's Name, Pet's Name, Date In, Date out, Price, # of Units needed, and # of dogs. I need to put in dates ie: 5-10-06 to 5-25-06 and get a total of dogs and a total of units so we don't overbook. When I made this program I have little idea of how to do it and now years later I'm trying to tweak it. Thanks again
I apologize up front for how long this is, but the queries involved are a bit complex.
I developed a database in Access 2003 running on XP sp2 to score events for our dog club. Everything works. I recently had to migrate to Vista. I installed Access without a problem. No changes to the database were made. Almost everything works except for a few queries. I continually get the error "Object invalid or no longer set." This is not running on a network - it is local on the hard drive. Setting XP compatibility mode and runing as administrator do not help.
The query that is actually causing the problem is the third in a chain, meaning it queries a dataset produced by another query, which in turn queries a dataset produced by a third query. This all works under XP.
I have narrowed the problem down to the ORDER BY statement in the query (I prefer to work in SQL). If I remove one of the sort criteria, everything works, except the results are displayed in the wrong order. It does not matter if I click the "run query" button on my form, or simply execute the query from the list of queries, the same error occurs. This is where I'm stuck.
Here is the chain. This query pulls data out of multiple tables and performs some point total calculations. This one is rather complex, but works fine. It produces a blob dataset of all entries for all events and sets points for each entry.
SELECT tblResults.Event_ID, tblEvents.Event_Name, tblClass.Class, tblDogs.Dog_Name, tblDogs.ID, tblDogs.Owner, tblDogs.Sex, tblResults.Dog_Wt, tblResults.Cert, tblResults.Ex, tblResults.Cplt_Wt, tblResults.Time, tblResults.Final_Wt, tblResults.Dist, tblResults.Place, IIf(tblResults!Cplt_Wt<400,0,5) AS Bonus, IIf([Bonus]=0,0,IIf(tblClass!Class="D",(tblEvents!D_Count-(tblResults!Place-1)+[Bonus]),IIf(tblClass!Class="C",(tblEvents!C_Count-(tblResults!Place-1)+[Bonus]),IIf(tblClass!Class="B",(tblEvents!B_Count-(tblResults!Place-1)+[Bonus]),IIf(tblClass!Class="A",(tblEvents!A_Count-(tblResults!Place-1)+[Bonus]),(tblEvents!O_Count-(tblResults!Place-1)+[Bonus])))))) AS Points, Round(tblResults!Cplt_Wt/tblResults!Dog_Wt,2) AS xbdywt FROM tblClass INNER JOIN (tblEvents INNER JOIN (tblDogs INNER JOIN tblResults ON tblDogs.ID=tblResults.Dog_ID) ON tblEvents.Event_ID=tblResults.Event_ID) ON tblClass.Weight=tblResults.Dog_Wt;
That resulting dataset feeds the next query, which also works fine. This one sums the points for each entrant by class for the season, only selecting entrants that have been in 3 or more events.
SELECT DISTINCTROW qryAll_Results.Class, qryAll_Results.Dog_Name, qryAll_Results.Owner, Sum(qryAll_Results.Points) AS Points FROM qryAll_Results INNER JOIN qryPulls_Entered ON qryAll_Results.ID=qryPulls_Entered.ID WHERE qryPulls_Entered.CountOfID>3 GROUP BY qryAll_Results.Class, qryAll_Results.Dog_Name, qryAll_Results.Owner, qryAll_Results.ID;
This last query is the one causing the headache. This one pulls the 10 entrants with the most points for a class, sorts them by points, then assigns 1st-10th place.
SELECT TOP 10 qryOverall_Totals_All_Classes.Dog_Name, qryOverall_Totals_All_Classes.Owner, qryOverall_Totals_All_Classes.Points, ((SELECT COUNT(*) FROM qryOverall_Totals_All_Classes AS T WHERE T.Class = "A" AND T.Points > qryOverall_Totals_All_Classes.Points)+1) AS Place FROM qryOverall_Totals_All_Classes WHERE (((qryOverall_Totals_All_Classes.Class)="A")) ORDER BY qryOverall_Totals_All_Classes.Class, qryOverall_Totals_All_Classes.Points DESC;
If you remove 'qryOverall_Totals_All_Classes.Points DESC' from the ORDER BY statement, the query runs. If you leave it in, it generates the error "Object invalid or no longer set". I've tried using the alias, but that didn't work either.
Any thoughts? I can post the database somewhere if someone needs to see the whole thing.
I have a little problem in creating a msg box that then activate a code. How can I do? I was doing
Private Sub Chiusura_Pratica_Click() MsgBox "Bla Bla Bla " _ VbMsgBoxStyle.vbYesNo If Response = vbYes Then Me.Stato.Value = "A Scadere" Me.Assegnato_a.Value = "" Else MyString = "No" End If End Sub
I need to find a way to close a file (spreadsheet) if it was left open by a user before my scheduled macros need to delete and remake that file to update it. Is there a way to do this in Access? I've been looking for scripts everywhere... Any help is greatly appreciated. Thanks, Rick.
Hi, I have been using the following query, literally for years, without any changes. I run it from code using db.execute, and I do use the dbfailonerror option.
One of the things it does is to add a '3' to the end of the [serial]. [serial] is the primary key in the TST3 table. You might think that there would be a problem if, say, I have a list of serials containing 35 56 1 13 and I'm trying to update them to 353 563 13 133 But this has worked OK in the past. NOW I'm getting a KV Error when it tries to update the 1 to 13, because there's already a 13 in the table.
Even stranger, when the query fails, all the rows BEFORE the offending record DO get updated. So the query fails, and I end up with: 353 563 1 13 (and yes, I DO have dbfailonerror set)
So, it looks to me as if update queries are no longer running as transactions. I am pretty certain that action queries have always been run transaction-wise in the past... if the query fails, the whole thing should fail. WHY is the transaction processing no longer working for this update query? Has anyone else noticed this?
I recently ran microsoft update and am now running Access 2002 (10.6771.6830) SP3.
I've a module which outputs some information to an Excel spreadsheet. This can take about 10 seconds. How can I change the mouse pointer to the egg timer whilst this runs? I have Excel visible set to false, until the end? I know this can be done in a macro.
I have an A2007 application running on XP. From main form, Form1, another form, Form2, is opened.
When I attempt to close the application by clicking in the cross in the rh-corner of Access window, I get a crash midway through the OnLoad of Form2. I cannot figure out why the heck the On Load event fires when the form is being closed, and have some difficulties stepping through the code.
I recall having heard of OnLoad firing when trying to close a Form.
The task is (1) output an Access query to Excel (2) overwrite that file if it already exists (3) apply specific formatting to the header row and the other rows in Excel. I have cobbled the code together from two sources. The beginning and end are adapted from code on btabdevelopment.com but the large insert in the middle is code I got form a project a former colleague had done. But he's no longer around.
The problem: I click the button and everything works OK. The file is created and formatted just how I want. If I click the button a second time though, it seems to run OK, but when I open the file it is NOT formatted. However, theres another window behind it called Book 1 which has all the data and all the correct formatting it just hasnt been saved. If I click it a third time I get an error message that says Object variable or With block variable not set. Im not even 100% all that is accurate because I have tried it a multitude of ways, closing and re-opening the form, closing and re-opening Access itself, starting with Excel open or closed, never with the destination excel file open though. I dont seem to get exactly the same behaviour any two times. But as far as I can see, if I close and re-open Access, it always works the first time. So I can live with it.
Code: Private Sub cmdExport_Click() On Error GoTo Errhandler Dim rs As DAO.Recordset Dim oExcel As Object Dim oBook As Object Dim oSheet As Object
Access 2007, Sql Server 2008 R2. Problem with refresh.
Form 1, (Single Form) Parent Form, contains Property Year Detail data. PK = PropYrDetID. This is a SINGLE FORM
Form 2, (Single Form) Child form, contains land square footage data from multiple records. PK = SPYDID FK = PropYrDetID. This is a SINGLE FORM.
The code below executes every time Form 1 opens, activates or whatever. The reason is that data in Form 2 changes frequently. Thus every time Form 1 opens the end user will see the latest data.
"Form 1" receives a series of values that it obtains from VBA code that runs when it opens or activates.
"Form 2" has the data being summarized in Form 1.
All of the code and queries below run fine and return the correct values from Form 2 to Form 1. My problem is Refresh on Form 1.
I've tried the code in the On Current, On Activate, On Load of Form 1. Mostly the data shows up in Form 1. Other times parts of the data are left out. I have to hit F5 or close and reopen the form, and then the data appears. When I don't see data on Form 1, I check the underlying table and the correct data exists. I don't know how to achieve a 100% refresh success. I have tried me.refresh and different Events all over the place.
All of the code below runs when Form 1 opens. Queries are fine, Equations are fine, Tests run fine. It's the results showing up that I am having the problem with.
I don't think the issue is with the code but with the Refresh. Here it is for your review.
The term "Equations" is the customers. There are 5 equations. Some have a series of tests after the Equation to determine the result.
Code:
Private Sub Form_Activate() Dim rs As Variant Dim varAOProp As Variant Dim varAOIni As Variant Dim varAOCert As Variant Dim varBORIni As Variant Dim varBORFinal As Variant
We are using MS Access as the backend to our application which has been written in delphi and have run into a problem that we have not been able to solve. Hoping someone has run into this before or any suggestions are much appreciated.
The problem:
MS Access runs slowly for client PC's after a update or insert.
- I am using ADO to connect to the Access database, which is using the OLEDB for ODBC Provider. - The application I have sends queries (both select and update) direct to the database (ie client datasets are used). - When only select queries are sent to the DB the response time is fine. - When an update or insert query is sent to the DB the response time of the PC it is run on is fine. - When an update or insert query is sent to the DB the response time of any other client PCs running the application take about 5 to 6 times longer to run queries than before the updateinsert query was done. This is the issue that I am having. - Any client PC's that display this slower response time, can have their response time returned to normal by closing down the application and restarting it. - No more than 3 PC's connected at one time to the DB. - Maximum database size of 150MB. - Problem occurs on various network setups, including domain and workgroup. - Problem only surfaces for users at times well after any application updates have been applied (ie several weeks after, and then once the problem starts it continues). - It does not occur for all user sites.
I have tried and thoroughly tested the following to no avail... - Applied all the latest microsoft updates - Closing and re-opening the ADO connection after updatesinserts - Changed the ADO provider to Jet 4 - Saving the DB in Access 2000 or 2002 format - Set the Default record locking to 'No Locks' and 'All records' and 'Edited record' - Used 'Open databases using record-level locking' selected and unselected - Many application techniques (using delphi) to work around the issue. Many of which have indeed improved general response times, but have not resolved this particular issue.
The only thing I have tried that has resolved the issue is... - Upsizing the database to SQL Server (Unfortunately this option is not a viable one for us at this stage, so I need to find a resolution to it while still using the Access DB).
I have an append query that everytime it runs it will simply duplicate the records. ex.. sample table has 11 records if you run it again the tableB will now have 22 records. I need it to only update the records, so if someone makes in change / new record in tableA it will only update the records in TableB. I have the Primary Key set to Yes no duplicates. TableA Primary Key is ID TableB Primary Key is CustomerID
I have a form set up and would like to have field update to a table when a policy number is input into the form. The fields are extracted from a linked table and are not viewed on the form but need to be written to a table to create a report. I'm confused on the sets to take to handle this. I think i need to use the "onchange" property and set up a macro that runs a query but how does the query write to the table?