Add Record And Email With One Command Button

Mar 28, 2008

I have set up a work order database. On the Work Order Submission form I have
a command button that adds the record to the table. I also have a button to
email the Submission Report. When the user fills out the form and clicks the
Add button the record is added to the table. The user then has to scroll to
have the record reappear in the form and then click the Email command button.
This works fine but I want to make this a one click operation.

I have a filter on the report that will be emailed to limit the report to just the current
record. The filter is:
[ID] = Forms![WO Submission]![ID]
where ID is the Primary Key for that record. If the record has not yet been
added to the table and thus has no primary key, the report to be emailed
will contain no record info.
I'm thinking I may have to use a temporary table but I'm clueless about how
to make that work.
Any suggestions?

View Replies


ADVERTISEMENT

Email Command Button

Aug 8, 2005

I searched the forums, I downloaded sample datbases EmailA2K, example, and PrintCurrentRecord_Update however I cannot get my command button to fill the TO: with my customer email address. I have gotten lost in the code so I went with a send object macro. Maybe it's my internet service. I use Compu Serv which is a by-product of AOL. Can that be the problem? Anyway I don't understand code, I wish I did. I select send object as my action in my macro. I leave the object type and object name blank as well as the output format. In the To: I put = [email address]. In the subject I put "From CG" and the Edit Message is set as "no". When I click on the button it opens up my email provider but nothing is in the To:. I first tried to fill in the Object name and type and format and it attached the records in the form, I DO NOt want to do that. All I want is to have the Email Address be filled in the To: by clicking a button. I'm about 8 hours on this and a little on edge. I would like to get a good nights rest and not think asbout this anymore. Any Macro help would be great.

View 2 Replies View Related

Email Based On Command Button

Sep 22, 2006

Hello all:

Right now, I have a contact database with email addresses, and would like to know if anyone has any suggestions on how to implement a command button that when I click on it, it will do the action as clicking on a link that says

mailto:anyone@anyone.com


If I type the mailto: before the email address, and click on it, it will open the email message window, but I am looking for a way to have the user click on a button and then it opens the email message window.

My field for the email is fldEmail

any suggestions?

~~Bradley

View 1 Replies View Related

I Need A Command Button To Print Preview And Email Two Reports

Oct 7, 2004

Like the title says I need a command button to print preview and email two reports. I tried using macros but the problem I have is that it'll send out two emails instead of one email with two attachments. The other problem is that it won't recognize current pages information so it'll show two blank reports. But If I go to next record and come back in form view, it reognizes the changes and the reports look fine. Any help would be appreciated.

View 2 Replies View Related

Create Command Button On Form To Send Email

Oct 26, 2004

I have created a form and housed in the form is a combo box that pulls info from managers I work with. I want to create a command button that I can click to send them an email. I have their information tabled and then have also converted that table into a form. I have their email address I just need to know how to properly code the command. I have no visual basic experience. I have had classes where I've coded in C++ and HTML but very limited.

Thanks

View 6 Replies View Related

Modules & VBA :: Command Button To Print Report To PDF And Email

Aug 9, 2013

A command button on a form that can:

1- Open the Report called : ConsentForm
2- Print it to PDF printer (report is currently defaulted to that printer driver)
3- Save to folder: C:SOSConsentForms
4- Save as: Consent_[Last]_[First] (these are field names on the form)
Result i.e.: C:SOSConsentFormsConsent_Doe_John
5- Then send the file by email (Outlook) to : abc@hotmail.com

View 14 Replies View Related

General :: Sending Text Via Command Button To Email

Mar 19, 2014

After inputting data into a text box on a form i want to click on a command button which will open an email program and then put the text there so i can send it.

View 1 Replies View Related

General :: Command Button To Email Report From Form?

Jan 30, 2014

I have a form that records data entered by a user who I then want to email the record via a report run from a query.

I created a command button on the form with DoCmd.SendObject acSendReport,"name_of_report", "format", "to","subject", False

The email program (Lotus Notes) opens a new email msg with the report attached as pdf. However, the data recorded does not appear.

View 5 Replies View Related

How To Add Record Thru Command Button In ADP

Feb 21, 2005

Hi all,

In access database project where my tables are linked from MSSQL server, how can I add record from the FORM itself using command button. Bcz it is not like mdb files in access that you can just drag a command button onto the form and take an action like add, delete, print or find rec. I just came to know it from immediate window using following SQL line;

Docmd.RunSql "Insert........

This is ok but how it could be done thru a command button on FORM.

Thanks in advance.

With kind regards,
Ashfaque

View 2 Replies View Related

Find Record Command Button

Oct 26, 2005

I know you can create a find record command button really simply, which when clicked will display the find and replace window.

What i want to do is create a command button that will search a specific field that i specify in a report for the criteria i enter.

i.e i have a customer information form, which contains

AccountNo
CompanyName
Address
Postcode
Tel etc

what i want is a button that when clicked brings up an input field that allows the user to type the name of the company into this field, then when either the enter key is pressed or another button on this pop up window the matching record will be displayed or a error window stating that there are no matching records. Can anyone help me with this.

View 2 Replies View Related

Command Button - Add New Record To 2 Subforms

May 13, 2006

Hi,

I have a form that contains 2 subforms:

Purchase Order (Supplier, Order Date, Tel etc)
Purchase Order Details (Item Description, Quantity, Price etc)

This way I can have several items in 1 purchase order.

I now need to create a 'New Purchase Order' button. I've tried doing this but it only creates a new record for the form where the button is placed i.e. if the button is in the 'Purchase Order' form a new record is created for Purchase Order but NOT purchase order details.

Is there a way I can get the button to add a new record to 2 forms at the same time?

Thanks

View 1 Replies View Related

New Record For This Contact - Command Button

Sep 7, 2006

Hi all,

I have a database for customer enquiries, and there is one record per product that the customer shows interest in. I want to have a button on the enquiry details form that creates a new enquiry but automatically fills in the contact details from the previous record.

Please also note that I do not wish to "normalize" this so that there is a seperate table for contacts and another for enquiries; it's much easier from our point of view to have the whole enquiry in one record, especially as this is a stand-in database before a fully integrated CRM is implemented. In any case most of the other data (e.g. product, category etc) is already stored in separate tables.

What sort of method do I need to use to create a Command Button that:

-Creates a new record
-Copies and Pastes data from selected fields into the new record?

I tried using the command button wizard for sample code but I got paste errors which were pasted into a new table, and I don't really understand the process of how this works as the Commands are numbers from a list (apparently in the macro window), which I can't find.

I'm using Access 2003 but the database file is in A2000 format. The code is below.

Thank you!



Private Sub ContactAddEnq_Click()
On Error GoTo Err_ContactAddEnq_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

Exit_ContactAddEnq_Click:
Exit Sub

Err_ContactAddEnq_Click:
MsgBox Err.Description
Resume Exit_ContactAddEnq_Click

End Sub

View 2 Replies View Related

Delete All Record Using Command Button

Nov 7, 2004

Hello all:

Code:

Private Sub DeleteRecords_Click()
Dim db As Database
Set db = CurrentDb
db.Execute "Delete * FROM tblJune 2005 applicants;"
End Sub

I am trying to delete all records from a dabase created in access. When I click the command button, I get this message: "User-defined type not defined"

Any suggestion on how to fix this error?

Many thanks in advance,

Dion

View 4 Replies View Related

Move Record Via Command Button

Mar 9, 2005

I have two table tbl_Employees and tbl_Femp my users use a form daily and now with help of baxter i'm finishing up on a new one. On my old form it was bounded and with a two step process check box and command button my users would send former employees to the former employees table, well i'm now using an unbound form and with the same script it will select all records and try to move them to the former employees table. here is my code:

Code:DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70Exit_saverecordcommand_Click: DoCmd.RunSQL "INSERT INTO tbl_Femp(FempID, FempLast, FempFirst, FempAdd, FempCity, FempZip, FempHomePhone, FempSSN, FempDOB, FempRank, FempRetCategory, FempComments, FempHireDate, FempRetDate) Select EmpID, EmpLast, EmpFirst, EmpAdd, EmpCity, EmpZip, EmpHomePhone, EmpSSN, EmpDOB, Rank, RetCategory, EmpHireDate, RetDate, RetComments from tbl_Employees where Retiredarchive =Yes"DoCmd.RunSQL "DELETE * from tbl_Employees where RetiredArchive = Yes"
Can some1 please tell me where i'm going wrong? thanks in advance...

View 9 Replies View Related

Reports :: Email Record With Button

May 2, 2013

1:is it possible to have a clickable button beside each record in the report format that when clicked runs another report and inputs data into parameter querys automatically that the second report asks for? Etc. the second report will ask for [Username], [start Date], [end date]it copies and pastes the details from the row clicked into these parameters? or get it to work in a simular way? reason being for this the details need to be in a certain format layout that then on a button click Emails the report as a PDF

2:is it possible to have a button on the report screen that will Email the report as a PDF file with only the parameter data shown?

View 1 Replies View Related

Command Button To Open Specific Record

Oct 6, 2004

Hi All,

I have a form called "frmProducts" which is linking to table "tblproducts".

Easy Enough...

The form shows all the Products information (fields).
I have a "More Info" command button (cmdMoreInfo) next to every record in the form.

When the command button is clicked I would like it to open up another form "frmMoreInfo".
But On frmMoreInfo I would only like it to show that specific product.

I have tried the following code on the on click event on the command button but it was always asking me for the value of Form![frmMoreInfo]![txtInternalCode]

Code:Private Sub Command12_Click()On Error GoTo Err_Command12_ClickDim stDocName As StringDim stLinkCriteria As StringstDocName = "frmMoreInfo" stLinkCriteria = "Form![frmMoreInfo]![txtInternalCode]=" & Me![txtInternalCode]DoCmd.OpenForm stDocName, , , stLinkCriteriaExit_Command12_Click:Exit SubErr_Command12_Click:MsgBox Err.DescriptionResume Exit_Command12_Click End Sub

Any Ideas?

View 4 Replies View Related

Command Button To Archive Single Record

Dec 21, 2004

I would like to develop a command button that archives the current record displayed in the form - my intent is to move that record from one table to another - a sort of automatic cut and paste from one table to another...can anyone help???

View 4 Replies View Related

General :: Using Command Button To Save New Record

Dec 7, 2012

I have have a form with 4 subforms in it, one of the subforms is based on a filtered query . For a reason I can not work out I cannot get it to requery when I add a new record.

To add a new record I select from a combo box and use a command button to save the record

I have tried using this in the buttons on click event

Code:
Forms.trialcatalogueF!TrialCompetitorsSF!competitorsSF.Form.Requery

with no result, however it does kinda work in the combo's after update event, just not until I select another value.

View 2 Replies View Related

Forms :: Command Button To Save Changes On The Record

Sep 30, 2014

I have a form named CORRES_TYP with 3 text boxes and a list box. I also have a separate table with 3 field from where the information I put in the form was saved.

In my form whenever I put information on the textbox at hit add record button, these information are saved in my table and will reflect on the listbox on my form below the textboxes. Also if I select a record in the Listbox the record I selected will apprear on the corresponding textbox in the same form.

My problem is that I have been trying to create a command button that will save and change the existing record everytime I select an item in the list box and modify the information through the textbox. Here are some infromation about my table and form:

Table name = CORRES_TYP
Field 1 = CODE (Primary key, No Duplicates)
Field 2 = DESCRIPTION
Field 3 = FOLDER

Form name = CORRES_TYP
Textbox 1 = CODE
Textbox 2 = DESCRIPTION
Textbox 3 = FOLDER
Listbox name = LIST14

View 9 Replies View Related

Forms :: Command Button - GoTo Next Record

Jan 15, 2014

I have created Command buttons on forms with VBA code. Records GoTo previous and GoTo Next Record so both of working is good. But Next Record command is force to a new record. If suppose when we clicking on last record. It is go to new record without any message. So No need to force a new record with Next Record Command. Only just move to next record if there is no records show a message. Below mentioned both VBA codes so there is any changes on GoTo Next Record Code?

VBA Code:
Go To Previous Record : DoCmd.GoToRecord , , acPrevious
Go To Next Record : DoCmd.GoToRecord , , acNext

View 4 Replies View Related

Forms :: Command Button To Add New Record In Subform

Nov 5, 2013

I am designing a database to manage hospital patient data. I will have to enter info at various points, e.g. when a patient is referred, admitted, discharged...

So for example, I have a main form with the patient's name and two subforms, one with the referral details (e.g. date, name of referrer...), and one with the admission details (e.g. date, diagnosis). They are linked through Parent-child links to the main form by PatientID. So, when I enter a new PatientID in the main form, the ID in the subforms is automatically added/synchronized.

However, I would like it not to be...since not all patients that are referred are then admitted. Therefore I would like to have a command button in the main Form that allows me to control when a new patient record is added to the admission subform. In other words, I would like an "Add a new Record in the admissions subform" button, which then creates a new record, with matching PatientID in the admissions subform (and in the related table). Is this possible???

I have tried using the command button wizard but it either requires a record to be already present in the subform, or it takes me to the first record of the form, and not the matching PatientID one.

View 7 Replies View Related

Way To Create A New Record By Clicking A Command Button

Mar 13, 2012

Is there a way to create a new record by clicking a command button but to show the same text boxes shown in the attachment in the next record.

View 1 Replies View Related

Forms :: Copy Record Button - Command Or Action Isn't Available?

Jan 13, 2014

I've rebooted my copy record button and just used the macro wizard for now, it seems to work as far as I can tell but there is something strange about it.

I've added in some text boxes so I've got some confirmation, but when I click this copy button I get the following error;

"The command or action 'RecordsGoToNew' isn't available now."

View 1 Replies View Related

Forms :: Recall A Record By Its Primary Key With Command Button

Jun 28, 2013

I want to recall a record by it's primary key in a form with a command button

I mean write a primary key in a textbox and press the button then it shows the record.

View 3 Replies View Related

Forms :: Command Button - Insert Into Single Record

Dec 3, 2014

I currently have a command button to run the following...

DoCmd.OpenQuery "Credit Card Report", , acAdd

Which is an appended query.

However, I don't want it to add the whole table each time this is pushed but when trying to use...

DoCmd.RunSQL "INSERT INTO [Credit Cards] ([Provider's Name], [Patient Name], [Patient Account Number] ... VALUES ([Provider's Name.Value], [Patient Account Number.Value], [Patient Account Number.Value]"

It doesn't want to add the single record and gives me an error. I'm pretty sure my syntax is wrong but not sure how to correct it.

The fields I want added are ... Provider's Name , Patient Name, Patient Account Number...

View 1 Replies View Related

Forms :: Change The Value Of Yes Or No Record Using Combo Box And Command Button

Aug 1, 2013

What to do, I have a form that will reset online user of my system the field is yes or no type boolean and i using combo box that will show only online people but my problem is how to reset the yes to no when i choose from the combo box a username I want to logout. I use command button also.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved