Dear all,
In my access database, I need to do a lot of consults, to exclude and
to include data in the tables. Then the database stay so "heavy".
I know that I can access Tools =3D=3D> compact and repair database, then
the database stay with your correct measured.
Is there any way to do this in vba code?
Thanks a lot!!!
Andr=E9.
|
|
0
|
|
|
|
Reply
|
gatarossi
|
9/18/2007 10:09:30 AM |
|
Hi
You could do this from an OnClick - something like
Private Sub ButtonName_Click()
Dim strDBtoBackUp As String
strDBtoBackUp = "C:\Documents and Settings\My Documents\DBName.mdb"
DBEngine.CompactDatabase strDBtoBackUp
End Sub
change the path to what it is.
--
Wayne
Manchester, England.
"gatarossi@ig.com.br" wrote:
> Dear all,
>
> In my access database, I need to do a lot of consults, to exclude and
> to include data in the tables. Then the database stay so "heavy".
>
> I know that I can access Tools ==> compact and repair database, then
> the database stay with your correct measured.
>
> Is there any way to do this in vba code?
>
> Thanks a lot!!!
>
> André.
>
>
|
|
0
|
|
|
|
Reply
|
Utf
|
9/18/2007 10:24:01 AM
|
|
Just note that you cannot do this to the database in which the code is
running.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Wayne-I-M" <WayneIM@discussions.microsoft.com> wrote in message
news:DF76F2EF-E72E-4F17-93A4-521590091C24@microsoft.com...
> Hi
>
> You could do this from an OnClick - something like
>
>
> Private Sub ButtonName_Click()
> Dim strDBtoBackUp As String
> strDBtoBackUp = "C:\Documents and Settings\My Documents\DBName.mdb"
> DBEngine.CompactDatabase strDBtoBackUp
> End Sub
>
>
> change the path to what it is.
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "gatarossi@ig.com.br" wrote:
>
>> Dear all,
>>
>> In my access database, I need to do a lot of consults, to exclude and
>> to include data in the tables. Then the database stay so "heavy".
>>
>> I know that I can access Tools ==> compact and repair database, then
>> the database stay with your correct measured.
>>
>> Is there any way to do this in vba code?
>>
>> Thanks a lot!!!
>>
>> Andr�.
>>
>>
|
|
0
|
|
|
|
Reply
|
Douglas
|
9/18/2007 11:21:05 AM
|
|
On Tue, 18 Sep 2007 03:09:30 -0700, gatarossi@ig.com.br wrote:
>In my access database, I need to do a lot of consults, to exclude and
>to include data in the tables. Then the database stay so "heavy".
Do you have a large number of queries ("consults" is not a good translation!)
because you have different criteria in each query? If so, consider using
Parameter Queries. Rather than a query "qryJune" with criteria
BETWEEN #6/1/2007# AND #6/30/2007#
and similar queries for July, August and so on, you can use ONE query with a
criterion
BETWEEN [Forms]![FormName]![txtStart] AND [Forms]![FormName]![txtEnd]
and similarly for many other queries.
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
9/18/2007 6:35:02 PM
|
|
hi
How I can solution this problem plz
thanks
"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:de60f3ldusse58e7ojv1aqo7o12e07elfn@4ax.com...
> On Tue, 18 Sep 2007 03:09:30 -0700, gatarossi@ig.com.br wrote:
>
>>In my access database, I need to do a lot of consults, to exclude and
>>to include data in the tables. Then the database stay so "heavy".
>
> Do you have a large number of queries ("consults" is not a good
> translation!)
> because you have different criteria in each query? If so, consider using
> Parameter Queries. Rather than a query "qryJune" with criteria
>
> BETWEEN #6/1/2007# AND #6/30/2007#
>
> and similar queries for July, August and so on, you can use ONE query with
> a
> criterion
>
> BETWEEN [Forms]![FormName]![txtStart] AND [Forms]![FormName]![txtEnd]
>
> and similarly for many other queries.
>
> John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
sora
|
9/20/2007 7:14:08 AM
|
|
|
4 Replies
124 Views
(page loaded in 0.137 seconds)
Similiar Articles: "connection failure, timeout or low disk" error ...Every once in a while during periods of heavy demand and ... in SSRS and have them all set fairly high so I don't ... BACKUP DATABASE [SharePoint_Config] TO DISK ... name ... Access 2007: Escape Out of Compacting Corrupts Database ...When using compact on close the code or the user closes the database and Access compacts it. So ... This kind of thing is >also a heavy duty operation that should ... dynamic reference to data in multiple closed workbooks - microsoft ...Once all the QCs are done for the week, he then exports the data out again so he can ... intensive process so what I'm proposing is to have Excel do more of the heavy ... Need a button to update a table - microsoft.public.access.forms ...(FYI, my primary expertise is in heavy > manufacturing real-time automated data-collection and control systems, so I > approah your questions from that perspective ... Access 2000 on Terminal Server - microsoft.public.access ...... application that is split up between a program database ... MVP Please respond only in the newsgroups so that ... isn't the issue per = se; I've=20 done fairly heavy ... Button on Form to Add more rows - microsoft.public.excel.worksheet ...... form is protected as there is some pretty heavy formulas and direct links to databases that update info for the form, so ... Excel 2007 User form Enter Data Last Row @Table ... Disk Setup for SQL Server - microsoft.public.sqlserver.server ...... their sql servers and so far they are not noticing any performance problems. ... to him it's also a heavy traffic database ... What is better, use DataContext or dataset - microsoft.public ...But I find LINQ to SQL to be so anemic that it is a ... as LINQ, but as soon as you start using it for data ... NOTE: DataSets, while a bit heavy, actually work rather ... Linking SO->MO->PO (GP 9 / Manufacturing) - microsoft.public ...... do not have GP loaded on my SQL nor am I planning on doing so. ... heavy ... I am having difficulty however, linking data from the POP tables so that I can link ... Lock a form - microsoft.public.access.forms... in a locked state (which bothers me a bit since data ... at least apply no locks on a newly created form), so ... it's not kosher with Access, but I'd prefer to avoid heavy ... AT&T gives heavy data users a not-so-subtle hint to ditch the ...AT&T gives heavy data users a not-so-subtle hint to ditch the unlimited plan. AT&T's new 3GB data offer, coupled with its policy to throttle heavy data ... Database - Wikipedia, the free encyclopediaRelational systems placed heavy demands on processing resources, and it was not ... retrieving, analyzing, and mining data, transforming,loading and managing data so as to ... Automatic Statistics Update Slows Down SQL Server 2005I have a database which has several tables that have very heavy write operations. ... Most OLTP databases don't change 20% of data and so auto stats ... Apple - Press Info - Apple Q&A on Location DataWhy does my iPhone need so much data in order to assist it in finding my location today? This data is not the iPhone’s location data—it is a subset (cache ... Verizon Wireless to Throttle Data of Heavy Users Starting Today... top 5% of users see a decline in their data usage (which is literally almost impossible for it not to decline) you see the 2GB threshhold decline as well. So the heavy ... 7/24/2012 5:27:41 AM
|