Actually, my code is working now with the init. My problem was that my queries were bunglesome, and the db I had inherited really should have had a composite pk - which I was able to do this weekend. That db, thank God, is working again well.
I do want to check out your db documentor.
I wrote a little piece of code where I enter a back end path and it parses all my dev db's for links to it. That way if I have to make a change to the back end, I can see what other db's are impacted.
FUN stuff.
Liz Ravenwood
Database Developer / Programmer
Super First Class Products
B/E Aerospace
O: 1.520.239.4808
www.beaerospace.com
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Crystal
Sent: Tuesday, January 31, 2012 3:50 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Re: syscmd and running queries -- PleaseWait form
hi Liz,
I have not had a chance to run my documenter on old databases yet ... gotta do some work today. Can't wait to play again! If you don't get what you need, I will find my code. As you can see on my documenter if you have run it, I use a form with a message and a progressbar made from a textbox :)
CalculateProgress is a procedure behind the PleaseWait form. It does this (which I wrote out in the next procedure, so I was not consistent!)
.txtProgress.Width = ((nModules + 1) / nObjects) * 3.5 * 1440 '1440 twips/inch
this simply multiplies the width of the textbox by the ration that is done. nObjects is the total number. nModules is the one it is on -- and I added 1 so the last round would show 100%
txtProgress is the textbox that shows the progress meter. It is 3.5" wide. Code uses twips so multiply inches by 1440
around the textbox for the progress meter, I have a gray rectangle to show how wide it is at 100%
Msg is a label control that displays whatever message I assign. If I do not assign anything, it says "Please Wait ..."
(this is why I do NOT save the form when I close it -- so I can open it and know what it will say ;)
twip =1/20th (TWentieth) of a point
inch = 72 points = 1440 twips
'-------------------- open PleaseWait form
DoCmd.OpenForm "f_PleaseWait"
With Forms!f_PleaseWait
.CalculateProgress (0)
.Repaint
End With
'------------------ change the PleaseWait message
With Forms!f_PleaseWait
.Msg.Caption = "Documenting " & sObjName
.txtProgress = ((nModules + 1) / nObjects)
.txtProgress.Width = ((nModules + 1) / nObjects) * 3.5 * 1440 '1440 twips/inch
.Repaint
End With
'------------------ close the PleaseWait form
If CurrentProject.AllForms("f_PleaseWait").IsLoaded Then
DoCmd.Close acForm, "f_PleaseWait", acSaveNo
End If
to see the progressbar in action, download and run my Code Documenter from Files > Crystal
CrystalsCodeDocumenter_999999
Warm Regards,
Crystal
Microsoft MVP
remote programming and training
Access Basics by Crystal
http://www.AccessMVP.com/strive4peace
Free 100-page book that covers essentials in Access
*
(: have an awesome day :)
*
________________________________
From: Liz Ravenwood
Thanks! I'll check this out.
Liz Ravenwood
-----Original Message-----
From: acravenrohm
Hi Liz,
it's not actually the acSysCmdInitMeter you need in order to display a text, use:
Access.Application.SysCmd acSysCmdSetStatus, sStatusText
(The "Access.Application." is only necessary if there's a chance a reference might be missing.)
However, if your users are anything like my users, they won't notice anything written in the statusbar.
Generally, a Progress Form gets noticed a great deal more than the statusbar but you may have reasons for avoiding a Progress Form and your users may be used to, or trainable to check for, information in the statusbar.
--- In MS_Access_Professionals@yahoogroups.com, Liz Ravenwood <liz_ravenwood@...> wrote:
>
> Greetings Pros,
>
> I am running queries and would like to use the status bar to indicate which query is running but all I'm getting is "running query" message.
>
> Here's what I'm trying to do:
>
> SysCmd acSysCmdInitMeter, "Appending data to ECO Tracker actions file... " & CStr(Now()), 0
> Db.execute("appECOTracker")
>
>
> Liz Ravenwood
> Database Developer / Programmer
> Super First Class Products
> B/E Aerospace
> O: 1.520.239.4808
> www.beaerospace.com
>
>
> This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
>
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Selasa, 31 Januari 2012
RE: [MS_AccessPros] Re: syscmd and running queries -- PleaseWait form
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar