Reports :: Concatenating 5 Fields To One On Report
Apr 1, 2015
I have five reason fields in my table and I would like combine them into one field on my report, with line breaks between so each reason starts on it's on line. Also if there is a blank record, I would like the report not to display a blank line. I have found ways to do this online for 2 records but I need this for 5.
Also when I do manage to get the lines all to show in the report there are 3 paragraph returns between them - making the reason display of the report 15 lines tall, not just 5. The code I have so far, which displays each of the reasons but spaced as described is:
I want to produce some UPCa bar codes which require 11 digits of TEXT for the barcode function to work.
I want the bar code to be made up of several fields Make 3 Chars (Text) (eg 021) Model 3 Chars (Text) (eg 103) Serial_Number 5 Characters (Numeric) (eg 00025) (I need to keep the Serial_Number field numeric so that it increments in modulo 10 format (ie get Numeric only results))
So i need to produce a field that looks like this 02110300025 after the 3 fields are concatenated
However I am getting 02110325
I'm sure that the answer is simple but I seem to be having a mental block. Does anyone have any ideas? Your help will be very appreciated.
Ive got a table called tblClientCar, this is its structure:
ClientCarID ClientID CarID
I want to use an append query to concatenate ClientID and CarID together and putting the concatenated value into ClientCarID. How would i do this?
Ive tried using a form a two combos so when i select the clientID from the 1st combo and then the CarID from the 2nd combo, then run the append query to write the concatenated value into ClientCarID of the table. But it says writing 0 rows to table and the ClientCarID isnt concatenated when i check the table. This is the query sql syntax i was using:
INSERT INTO tblClientCar ( ClientCarID, ClientID, CarID ) SELECT tblClientCar.ClientCarID, tblClientCar.ClientID, tblClientCar.CarID FROM tblClientCar WHERE (((tblClientCar.ClientCarID)=[Forms]![frmClientCar].[Combo6] & "" & [Forms]![frmClientCar].[Combo8]));
I also tried another way. The 2 combos add the selected values into ClientID and CarID in the table tblCar. So i made the append query slightly different to concatenate ClientID and CarID to form ClientCarID. This is my query sql syntax:
INSERT INTO tblClientCar ( ClientCarID, ClientID, CarID ) SELECT tblClientCar.ClientCarID, tblClientCar.ClientID, tblClientCar.CarID FROM tblClientCar WHERE (((tblClientCar.ClientCarID)=[ClientID] & "" & [CarID]));
I get the same result as the 1st query. What am i doing wrong? Is there another way of doing what im trying to do? Whats the correct sql syntax for doing this?
We use two different systems in our office that have notebook facilities. One of them stores only a limited number of characters in the note field per record and as such, some notes actually span several records. The other system stores the whole note in one record. We want to transfer all the notes from the first system (1 note over several records) to the second system (1 whole note in 1 record). I have a table with the notes from the first sytem which looks something like Note1 - Line1 - Text Note1 - Line2 - Text Note2 - Line1 - Text Note3 - Line1 - Text Note3 - Line2 - Text Note3 - Line3 - Text
What I want to do is, for each note, combine the separate lines into one record. I have been able to do this in Excel with some formulas (see attachment) but am wondering if it is possible to do this in an Access Query (i.e. GroupBy the note number and have a calculated field combining the individual lines of the note, or something similar)?
In a query, I'm using concatenation to join multiple address fields (organisation, building number, street address, etc) into one field. I'm also inserting line breaks to create a formatted address and then creating a form on the query so the formatted address appears in a text box and can be copied and pasted straight into my label-writer software to print address labels.
However, one problem with which I am now presented is where a field is blank. E.g. if one of my contacts is retired, then they don't have an organisation listed in the "Organisation" field. This means that a blank line is left between their name and the rest of the address.
When running a mailmerge there is the option of skipping blank fields so that a blank line is not inserted in such cases.
I have a query that is set up to join two name fields...for example:
[ELIGVENDORS.LSTNAM] & [ELIGVENDORS.FSTNAM]
The issue is that this is perfect for names that are entered in the table like this:
Lstnam: ABC HOSP Fstnam: ITAL
They are entered like that for groups, but when individual doctors are entered, the data entry folks are entering them like this:
Lstnam: SMITH Fstnam: BOB Titlcd: MD
So when I join them the first displays correctly as ABC HOSPITAL, the second displays as SMITHBOBMD and I have to manually go in and add a comma.
Is there a way to do an if/then statement or something to tell the query to display results If the titlecd is NOT NULL, display as [ELIGVENDORS.FSTNAM] & [ELIGVENDORS.LSTNAM]&", "&[ELIGVENDORS.TITLCD], else display as [ELIGVENDORS.LSTNAM] & [ELIGVENDORS.FSTNAM]
I'm sure there is, I am new to IF/THEN statments though and was hoping to get some help setting it up.
Thanks in advance and I hope my description is clear enough.
I am trying to concatenate Address fields into one text box. The Control Source pull-down menu gives me the Field Names listed as QueryName.ColumnName.
I know that if they listed the fields as just ColumnName, you'd simply go: ColumnName & " " & ColumnName2...
But the way these columns are defined, I cant find the correct syntax.
Is there a way to do this without changing all my queries??
I have an odd thing happening with my reports. There is a main report that gives class information (from query). There are two subreports (from queries also ) with scores (one for each type of test). There are some unbound controls on the main form that display a count of how many scores are recorded which are totals from the subreports. The controls all report the correct numbers however, when I scroll down to view each record, some of them change to #error, or #name, or similar for a moment. Sometimes they will stay in error form when I stop scrolling but change to correct if I scroll up just a bit. Is this because the controls won't calculate unless that report record has focus?
I have an unbound form with an associated report. When the user hits the 'print' button on the form/screen, the report is launched in the background. In the On Load event of the report I populate the report fields from the forms field as so:
This works like a charm as long as I call the report in Print Preview mode (i.e. with acViewPreview). But if I send the report directly to the printer, none of the fields print.
I've read about using other report events to populate the fields (e.g., On Format and On Print) and also something about using TempVars to pass the data. But I haven't read anything that's clear and definitive about the full answer.
This Works:I have a report with subreports that provide totals to the main report. The main report is grouped to provide the totals by customer. Here is the format:
I'm using Access 2010 and creating a report that is summing 16 fields but the wizard says I have too many fields selected. I had tried creating the report from scratch adding a sum field in the group footer but the field appears blank.
Below is what I am adding together all from one table. I have another report that will need to sum up 20 fields from a query.
I have a hourly report I need to run and one of the records will always be filled with a name of the employee. I need to hardkey some data in every day and instead of changing who is there that day I would like to be able to enter in, for example, sales data in a seperate record and when I go to create the report it will exclude any employee names that have 0 sales data or a blank record. so the table would be something like:
I'm trying to create a report with data from 7 different tables. It's supposed to be an assignment overview for a transfer company (driving people from A to B, dunno how to call it in English). I put assignment and customer details into the page header, which is working out fine so far. But now I want to show transfer details and it's proving to be a bit troublesome.
When creating the assignment, the user can choose whether the transfer goes from/to an address or from/to an airport. Depending on which one he chose the data is stored in different tables. To determine whether it is an outward journey/collection, outward journey/target, return journey/collection or return journey/target, I put a field in each of those tables ("Schritt", its value being either 1, 2, 3 or 4).
To visualize I made screenshot of the tables in relationship view, but since I'm a new member i can't seem to post images, so I'm giving you a pseudo URL...
[abload (dot) de (slash) img (slash) transeren40p1r.png]
Having the "Schritt" value for each step in either one or another table (address(es) or flight data) is making it a bit hard for me to wrap my head around the problem. Is that doable with expressions or is there a way in VBA to solve this problem?
In my Access 2010 report, I am attempting to perform conditional formatting of one field based on the difference between two fields. In particular, one field is "Time Scheduled" and the other field is "Time In". If the "Time In" is equal to or greater than 60 minutes of "Time Scheduled", I would like to format it to be red font. If it is less, I would like to format it to be green font.how I can conditionally format to do this?
I am trying to add conditional formatting to a several fields in a report. So far i can use the contional formatting to set a field called [colour] to set that field to red and bold. But i believe I need to use an Expression for all fields, so I can make all fields that = red go red. I have used the the expression:
I've created a report based on emergency contacts however some fields are blank as there isn't a "contact" and rather then have lots of empty fields all over the report is there anyway to omit them based on whether they are populated or not? there might be 2-3 records that have "every" field filled the rest are varied as to how many contacts they have.
I have a report based on a query. Sometimes some of the fields on the report are blank because the information is not available. Is there a way to not show the blank fields on the report and to move the next field up into the space?
I have tried using Is Not Null on the query criteria but if any one field is null it doesn't show any of the others on the report.
I have currently got it so that the height is set to 0 and can shrink = yes and this seems to work but the field is still there (although hidden) - I would rather it was removed completely if it is blank as I am hoping eventually to make the output for each field show on a PowerPoint presentation and I don't want blank slides which I think this solution might do??
I have a report that is purely for points gained from products. Each product is split into 3 (e.g. Investment A, B + C) and there is a indicator that means the points gained can be added up (e.g. I for Investment and S for Savings).
I have made the report which is many unbound fields. There is a summary section for all points added together with fields Total Amount, Monthly Target, Quarterly Amount and Quarterly Target.
Then the report is split into each of the 4 products (Each of these have different amounts of points. Number indicates it):
Investments (10), Savings (15), Pensions (15) and Protection of Life Savings (20).
Each of these have 4 fields - Total Amount, Target Amount, Quarterly Amount and Quarterly Target.
I need a way to generate these point scores using the Product_Points field. I already have Quarterly Target and Target Amount because there is a set field called Points_Annual_Target.
EDIT: I also don't want it to come up with the 'insert parameters' so all the info is one page.
If one of the fields are 0 then it returns this error on my Reports in the Field and/or in the Sum of these. I read somwhere to create a tblDivByZero table but since I'm a novice I still can't make this work.
How to Elimate #Div/0! Errors in MS Access Reports