Startup Popup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guy's,
just a quick one (i hope)

Is there any way to be able to run a popup when the database is started each
time that says something like "Don't forget to run your daily reports" then
an ok button to clear.
also,
just got asked if there is any way to have an email sent to someone once a
yes/no field has been ticked yes?
I have a field that people will tick if the record they are filling in is a
"breach".
I do have a "save record" button on the form if that helps.

Thanks for all your help in the past.
Leo
 
Startup issues resolved, added a msgbox in the startup macro.

but help on the email issues would be good.
thanks
 
leo said:
Startup issues resolved, added a msgbox in the startup macro.

but help on the email issues would be good.
thanks
Private Sub Active_AfterUpdate()
MsgBox "Send message to " & Me.FirstName & " " & Me.LastName,
vbOKOnly
Call VerySimpleSendMailWithCDOSample
End Sub


Public Sub VerySimpleSendMailWithCDOSample()
' requires reference to cdosys.dll
'--- copied w/o mods from Lyle Fairfield

Dim iCfg As CDO.Configuration
Dim iMsg As CDO.Message

Set iCfg = New CDO.Configuration
Set iMsg = New CDO.Message

With iCfg.Fields
..Item(cdoSendUsingMethod) = cdoSendUsingPort
..Item(cdoSMTPServerPort) = 25
..Item(cdoSMTPServer) = "SMTP.SomeDomain.Com"
..Item(cdoSMTPAuthenticate) = cdoBasic
..Item(cdoSendUserName) = "UserName"
..Item(cdoSendPassword) = "PassWord"
..Item(cdoSendEmailAddress) = "Some One<[email protected]>"
..Update
End With

With iMsg
..Configuration = iCfg
..Subject = "Whatever"
..To = "(e-mail address removed)"
..TextBody = CurrentProject.Connection.Execute("SELECT * FROM FirstTable
").GetString(adClipString, , vbTab, vbNewLine, "")
..Send
End With

Set iMsg = Nothing
Set iCfg = Nothing

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top