Whoops, hit send too soon!
ie
bar.visible = true
bar.value = 0
..
rs.movenext
bar.value = rs.percentposition
Set the property to smooth scrolling and it looks really good!
The problem with not being able to send is due to a security fix. There are a couple of ways around it, personally I call a command line SMTP mailer (BLAT) and have it mail out. (I use this for a routine that compacts all of our BE db's and then mails me a report when its done...
A thought, you could do a make table query and create just the structure with the query, then mimic the append through vba. You will still need to have a number increment, (take the count of the total recs that you are adding to use for the bar) but that should work. This may slow things down...
The problem you are having is this
'find records that match the current matchkey
rst.MoveFirst
rst.FindLast "MatchKey = '" & MatchKey & "'"
I see the code where you are getting the last key, but you are not incrementing through the records to check the matchkey against...
So basically it acts like a command line emailer. If you can send mail via your corporate SMTP server, you can send mail via Blat. Again this would not be installed on the MAIL SERVER, it would be installed on the machine running your code.
Umm that is what the Blat software does. You tell it the server that you want to use as SMTP and it sends via it.
Install instructions for Blat
Installing Blat
Copy the file blat.exe to your \winnt\system32 directory, or to any other directory in your path.
Run blat -install yourhost...
I found that the MS updates were often causing issues with sending mail using Office XP (Bypassing the security dll's didn't seem to be the best way to handle it) So I set out to find a way to email without using Outlook.
I found a command line SMTP emailer that was open source called Blat...
Personally my solution was to shell to Blat emailer. It allows attachments and doesn't use Outlook at all. It does require that you have a SMTP server available tho.
http://www.peterssoftware.com/cal.htm
This works GREAT!!! You can tell it to compact and repair multiple databases at a time! I modified this to send an email with a report of the job run. (Used blat emailer from a shell command)
I can say after 6 months of running, our ACCESS DB's have...
The timer event is only used to allow enough time for the form to open. The form is being updated in the example above every 5 seconds. IF I just used the timer event I still would have to keep track of how many times it has iterated and I decided to use real time (stead of the timer event)...
The looping in the procedure is to give the user a countdown. I also added a progress bar to this and it works well. What this is for is the final form to be displayed before booting a user for maintenance. A more user friendly form is displayed for 5 min prior to this.
The fix above stopped...
Aha! Got it! (sorta)
I created another control box with a height of 0" and a width of 0" and then added
If (time_left / 5) = (Fix(time_left / 5)) Then
Me!Text3 = "Application will close in " & time_left & " seconds."
Text11.SetFocus
Form.Repaint
End...
I am having an interesting problem. When I update the unbound field in a form with the remaining time, it flashes. Is there anyway to eliminate this? (I reduced it by counting by 5's, but I would like to have it countdown without having to do that)
Here is the code:
Private Sub Form_Timer()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.