However, if I use a text box on a form, with "New Line in Field" set, and then in code use Sendkeys to post the address and the carriage returns as above, it does work.
The following code is in a text box on a report in a database that creates work contracts. The IIF statements and Dlookups pull the parts of the text together perfectly, but why the new line and carriage returns are completely ignored in the last section? Been working on this all day and we can't find a way of inserting 2 new lines!
Code:
=DLookUp("Description","QFRCL07") & (IIf(DLookUp("Description2","QFRCL07") Is Not Null,DLookUp("BasicSalary","Tmain","ContractID=ContractID") & " " & DLookUp("Description2","QFRCL07"),"")) & (IIf(DLookUp("Description3","QFRCL07") Is Not Null,DLookUp("Job","Tmain","ContractID=ContractID") & " " & DLookUp("Description3","QFRCL07"),"")) & (IIf([Forms]![FFRRCheck]![Text305] Is Not Null,(Chr(13) & Chr(10) & Chr(13) & Chr(10) & [Forms]![FFRRCheck]![Text305]),""))
I have developed a private sub which automatically creates an email when a button is pushed.
The code is working well, but I need to insert Carriage Returns in the Body Text of the email just before the word "Please" where it appears in two places. Is this possible?
I import data through different files into a table, the data comes in different formats. I have a problem sometimes some records have double quotation marks and carriage returns. I know how to replace them as
Carriage Returns
Replace([FieldName],Chr(13) & Chr(10),""
Double Quotation Marks
Replace([FieldName],Chr(34),""
But if i want to use an iif statement because in the field there could be a Double Quotation Mark or Carriage return then it does not find the record
iif([FieldName] like Chr(34),Replace([FieldName],Chr(34),"",[FieldName])
I am trying to generate letters from ACC2003 db into Word2003. Reason for Word is so client can edit letters if required. I have set up a maketable query to generate a temporary table in the Db and the mailmerge master document all formatted and pointed at the temporary table. I still need to get the automation running so that the letters merge and print on a command button. My immediate issue is that the address lines are intentionally spread across 5 fields Addr1, Addr2, Addr3, Town, Postcode. Not all fields in every record are full, and with the query it would be impossible to eliminate fields on the chance they might be empty. As a result my mailmerge has blank address lines which do not look professional. Can anyone point me to how I might solve this given my proposed use - if it was a report then I have a little code module that neatly eliminates blank lines but I cannot see how I could integrate this into the mailmerge process. Thanks for any help or pointers
I have an access table which lists a customers address, however, if the customer has a temporary address it will also list that on a separate line -
CustID Address Type 1234 5 The Street P 1234 12 The Street T 2345 13 The Road P 3456 12 The Avenue P
Where P = Permanent and T = Temporary
I want to set up a query to show the permanent address where there is only one address, but where the customer has a temporary address also, I want to list the temporary one instead.
I have a form bound to a table which stores contact info for a person. I have two controls that are email_address and website_address. I set them both as hyperlinks. So now when the user clicks on the email_address Outlook opens a new message with an email_address in the To field. (I had to use a function found on this forum to replace the "htttp" with "mailto" on AfterUpdate event in order for this to work properly.) However, now trying to add some other features to my DB I ran into problems listed below. I wonder if I should have rather left that control as Text instead of Hyperlink, and use the DoCmd.SendObject on doubleclick event instead of using the above solution. How people usually store email addresses and enable emailing on click?
The problems I ran into: 1) My main form is in popup mode and therefore right click on the hyperlink does not give an option to edit the hyperlink 2) I copied a function from this forum which gathers a list of emails and sends one message to the emaillist. However, my email list instead of generating as: email1@a.com; email2@b.com it generates as: email1@a.com#mailto:email1@a.com#; email2@b.com#email2@b.com#
I guess I could extract the email using vba (not sure how), but I still don't know how to solve issue number 1. So maybe it is better to siwtch the field to plain text and forget the hyperlinks?
Thanks, Mariusz
PS. What procedure on double click would open a default browser, since I also have to deal with web addresses and thought of turning them into text controls?
I have a bound form which opens as a new record. If I accidently press carriage return by mistake whilst entering it goes to another new record, how do I stop this behaviour?
I only want the record to save with the click of a button.
e.g: InputText is 123, InputText2 is abc I wanted to display the text inside textbox of frmCalendar as: 123 abc instead of 123abc. how shall i use the vbCrLf?
I am trying to reformat a string of text so that it is easier to read on a report.Based on the text, it seems like the best thing to do is to insert a carriage return before a date/time stamp.Here is the data (it's a conversation log)...it is three unique conversation log entries:
04/13/2014 8:21PM - all work and no play is no fun - Bob Smith04/13/2014 8:21PM - this is a test of the emergency broadcast system - Bob Smith04/13/2014 8:20PM - log testing - Bob Smith
If the carriage return is before the date/time string, then all entries would look the same. If the carriage return is after the date/time string.A user had suggested a child table to break out the data into separate records, but I'm sad to say that I never worked with child tables. Any way for replacing 'Date/time stamp' with 'carriage return' & 'Date/time stamp"
How i can cancel the a carriage return and replace with a tab or stop it moving down my subform and make it move the the next field instead of going to a new line.
I am using the Keydown but don't know how to cancel it, it just bring an message but it stops it moving to a new record,
Code:
Private Sub Barcode_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then MsgBox "rtn pressed" End If End Sub End If
I am sending an email from a button, and it runs a word merge and then attaches that word document and two others two an email. All that works fine, but in the body of the email the carriage return is not working.
I've tried "vbCrLf", "Chr(13)" and "Chr(10)". but none of them are working in this email. I use vbCrLf all of the time in many other emails and it works fine.
Code:
Public Function SendEmailFinancial() Dim MessageBody, vAttach1, vAttach2, vAttach3, vTo Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem
[Code] ...
This is what the email is looking like when it comes out:
Project ID: 2013YG00229 Project Title: Toolbox Talks Construction Safety Guides and Mobile App Program Manager: Shana Peschek I am attaching three (3) forms that are needed in order for the State of Washington to process grant payments for your organization for the purposes of carrying out the activities outlined in your final approved application.
I have a database that has the basic tables of products, accounts and orders.
I need to figure out how to deal with returns.
Do I create a separate table and link that to the orders table for returns?
I haven't made such a large database file so I was curious if anyone had any information on how to lead me in the right direction. Or if there were any examples. (I've looked around but haven't completely figured out the best way to handle this.)
I need to make a returns notification if people bring back there rentals back late in my database for a rental place like blockbuster. Please any help would be appreicated. Sorry I rushed this post If you need any more information reply
Hi, I am new to access and have just started to build our first database. We are an engineering company who sells automotive components. I have set up the database to process customer orders. Some of the products we sell are remanufactured and sold on an exchange basis. So, once a unit has been sold at some point in the future the customers original unit comes back to us to be remanufactured - but this is not the case with all products we sell.
The exchange units are booked in using a tracking number and then given a unique reference number. I want to create a database that enables me to book an order and be able to enter a courier tracking number for the old unit when a return is required. The tracking number is given to us by our couriers. I want my staff to be able to enter the tracking number and the original customer order to then appear, they then need to enter the unique number given to the return unit.
The problem I have with this is that the exchange unit is normally returned weeks after the original order was sent, and that not every product requires an exchange. Is there a simple way of dealing with this?
Sipping branchReceiving BranchProduct #Qty to ship a c PR1 43 a d PR1 25 a k PR1 1 ....
Now I want to delete all lines that have same product code and shipping branch as a privous line. So the only max amounts for each product and each shipping branch will remain.
Hi. (I already ask how to delete rows but it looks too hard to make so I invent new idea) How I can add lines (INSERT INTO) into table so that Access does not add lines which already are in the table??
Is it possible to create a message box with two lines?
Also I want to make a reference to the valuein a text box in the message box.
This is my code at present:
If MsgBox("ARE YOU SURE YOU WANT TO DELETE THE WHOLE EXERCISE?", vbYesNo + vbQuestion, "Warning") = vbYes Then CurrentDb.Execute "DELETE FROM ExerciseNametbl WHERE ExerciseName = " & Chr(34) & Me.ExerciseName & Chr(34), dbFailOnError Me.ExerciseName.Requery Else Exit Sub End If
What I would like is:
"Are you sure you want to delete (The value of comboExerciseName)"
Hi, sorry my english, but I will try to explain what I try to do. In my database I have a form, where is a listbox. In this listbox are names of documents. Problem is that the name of each document is so long (two or three lines on monitor) so it is not possible to fit in, because listbox has always only one line for each document. It is possible to set up listbox to get more lines for each item ? I will be very happy if somebody help me with it. Thank you very much. Jirka
I am working with an access table populated from an excel spreadsheet due to its source if a person has more than one line of data the fileds are left blank.
Example:
ID Name Date diagnosis
01 Smith, David 07/01/2004 sore throat
02 Strep Throat
03 Broken arm
For Smith, David he had 3 diagnosis but the field date and name are blank as they would have been the same as ID 01. I have written a query to populate the blank fields:
IIF([name] is null, dlookup("[name]", "tblDiagnosisUnder16final","[Id]=" & [id]-1),[name]) This works great for lines with only one blank, but in the above example for ID 03 the name field stays blank as it is looking at field 02 which is blank in the table.
What I need is a loop to keep moving up the table until it finds a field that <> Null. I assum I should write a function and palce it in the if statement above where the -1 is but I am strugling with comming up with a solution.
How would I go about getting vertical lines as column seperators down the entire page. The problem I run into is every time the row size changes there's a break in the column dividers. Someone suggested using a function in the On Print event for the report, but there is no OnPrint field in the event tab of the reports properties. If anyone ever did anything like this before, please let me know.
Is there any way of making a comments box (memo) have the functionality to press return and start on a fresh line as it all seems to run into one 'indecipherable blob'