Command Button Question? (1 Viewer)

vividor

Registered User.
Local time
Yesterday, 23:24
Joined
Aug 5, 2002
Messages
31
I have a Form and when the user finish the form I want the user to click on a command button name "Report Completed".

This command button will save the record but at the same time will take the information from 3 fields in a table, copy the information to another table name "Reports Submitted" and sent a message box to the administrator that "bla bla bla".

Does anybody has any idea how to do that, any suggestions would be gladly appreciated.

The idea is let the administrator know that one of the users has completed the report and save it.
 

pacsfo

Registered User.
Local time
Today, 04:24
Joined
Nov 20, 2002
Messages
10
email code

For the email, if they have outlook installed, you can use something like

message = me.field1 & me.field2......

Set MyOlApp = CreateObject("Outlook.Application")
Set CheckMail = MyOlApp.CreateItem(0) 'create new mail item
CheckMail.Subject = "yadya email subject"
CheckMail.to = "admin@yayaya.com" 'mailbox to send to
CheckMail.Body = message
CheckMail.Send


For the update, run an update query (insert into....) or why don't you just add a flag to the same table that you marked as yes when the item is submitted?
 

vividor

Registered User.
Local time
Yesterday, 23:24
Joined
Aug 5, 2002
Messages
31
A flag is a good idea.. but How can I do that?

I already created a query and I added an extra field in my main table named "RptCompleted".
How I can make the command button "Save Record" to flag "yes" the field "RptCompleted" ?
 

pacsfo

Registered User.
Local time
Today, 04:24
Joined
Nov 20, 2002
Messages
10
update flag

Me.RptCompleted = True should do it (if it's a yes/no field)

otherwise

Me.RptCompleted = 'Yes'
 

Users who are viewing this thread

Top Bottom