String Concatenation

Sep 14, 2007

In the table, i already had a few columns:

string1 string2 string3
001 1 1.5
001 2 6.4


I'd like to add a new column and concatenate the strings in previous columns with additional characters:

string1 string2 string3 string4
001 1 1.5 c-001-b01_1_5x
001 2 6.4 c-001-b02_6_4x
002 3 7 c-002-b03_7x

Is there a good way to do this? Thanks in advance.

View Replies


ADVERTISEMENT

String Concatenation Into A Textbox

Dec 13, 2005

This really is more of a VB than an Access question, but I need it answered, and I don't know a good VB forum so....

I have a text box that I'm trying to add text to, I have a loop, and every time through the loop it's supposed to concatenate new text into the text box by appending it to the end. I can't seem to be able to find a way to do this. I can't use the <&> operator, and VB doesn't have a <+=> operator (I wish I could do this in C/C++, but oh well). Any ideas? Or do I have to set the existing text to a string, concatenate the new text onto that, and then set it to the textbox?

View 3 Replies View Related

Using A String Concatenation To Refer To A Control Name?

Feb 28, 2015

know if there is a way to use a string concatenation to refer to a control name. eg. Referring to Control1, Control2, Control3, Control4, etc using something like Me.["Control" & "1"], Me.["Control" & "2"], etc

View 6 Replies View Related

Concatenation

Dec 20, 2005

Hi,

Just wondered if someone could help me with this prob?

The following text appears in a text box on a report

=[HirerCurrHouseNo] & " " & [HirerCurrAddress1] & Chr(13) & Chr(10) & [HirerCurrAddress2] & Chr(13) & Chr(10) & [HirerCurrTown] & Chr(13) & Chr(10) & [HirerCurrPostcode]

My prob is that if say "Address line2" is blank, I get horrible blank line in address (which looks rubbish when pirnting a letter!). What I would really like to do is move the lines up so they show as a proper address..

eg
Mr Joe Bloggs
29 The Street
Anytown
HD11AG

Not

Mr Joe Bloggs
29 The Street

Anytown
HD11AG
Thanks - And Merry Xmas!

View 1 Replies View Related

Concatenation

Sep 30, 2006

Hello,


I have a query ... i hope that you can help me solve it!

I am creating a database where i was the ID to be concatenated from 3 fields. I did that well i think i did but when i save the concatenation of the ID is not saved in the table .. :confused:


In the ID field in the form i added this in its control source [ =[Field1] & "" & [Field2] & "" & [Field3] ]

.. In the form it concatenated fine but in the table all the fields are saved except for the ID ... :rolleyes:


Help please!

View 2 Replies View Related

Self Concatenation

Mar 27, 2005

H ow to concatenate the records of a single field with iteself
forexample

invoice no:
1
2
3
4
5
...

i want it to be written as
1,2,3,4,5,6

can it be done
can i concatenate records with each other of the same field.

View 3 Replies View Related

Concatenation For Control Name

Mar 7, 2008

Hi all

Is it possible to use a variable to finish the name of a control?

e.g.

Cell = me.A1 (where A1 is a lablel with the name a1)

forms![Myform]! "Cell".forecolor = 65280

What I am basically trying to do is to have a variating control name that i can change the color of.....too long to explain why really.

Can anyone help me please....is this possible?

Thanks

View 8 Replies View Related

Please Help With Concatenation Query

Mar 8, 2006

I have a table that I need to query that looks something like this:

ID Type Product ID
123 Health 323
123 Health 424
123 Dental 424
124 Health 323
125 Dental 323

What I need to see is something like this:

ID Type Product ID
123 Health 323 + 424
123 Dental 424
124 Health 323
125 Dental 323

In other words, I need to have the Product ID field concatenate for like ID and Type. I know it would likely involve writing some code but I am a total beginner in that respect and I don't know where to even begin. I could really use some help. Of course I need this as soon as possible! :(

To make matters worse (well, maybe it does), I am using Access 97.

Thanks so much!!!

View 4 Replies View Related

Concatenation Frustration!

Jul 26, 2007

Hey everyone,
Well i've searched, and have been trying to use 'fConcatenateFldGroupBy' in a query in order to perform the following combining of data with a criteria requirement...

All data is in one table: (frequently re-imported, so no relationships)
Obviously data needs to be stored more efficiently, but I have no control over the imported data structure. Here is what I'm after:

Table structure:
ID - Name - Status - Comments
1120 - One - Pass - uniquecomment1
1120 - One - Fail - uniquecomment2
1120 - One - WIP - uniquecomment3
345 - Two - Pass - uniquecomment5
345 - Two - WIP - uniquecomment6

Need a query to format data as:

ID - Name - Status - Comments
1120 - One - Fail - uniquecomment1, 2, 3...
345 - Two - WIP - uniquecomment5, 6..

As you can see comments need to be concatenated with commas seperating them.
As for the Status determination, it needs to be determined for the ID based on certain conditions. If at least 1 is fail, all fail. Iff all pass, all pass. If no fails and 1 wip, WIP, etc.

I have wasted too many hours trying to figure this out on my own, so I'm seeking your help! Any input would be appreciated. Thank you.

View 7 Replies View Related

Concatenation Module

Aug 18, 2006

Please can anyone give me a piece of code to combine the text from memo fields in 25 different queries and put it in one text box for printing?
Thanks.

View 2 Replies View Related

Aggragate Concatenation

Aug 22, 2006

I have some data and I want produce a summary report. The trouble is that I need to combine F2 in to one value. AggOfF2 is produced by taking the distinct values for F2 in the group, and concatenating them together with a "/" seperating each element. I don't believe there is a built in function to do what I want, but can I create a function in VB? If so, how?

SOURCE
F1 F2 AMT
1 A 1
1 A 1
1 B 1
2 C 1
3 D 1

SELECT F1, AggFunc(F2) AS AggOfF2, SUM(AMT) as SumOfAmt
FROM SOURCE GROUP BY F1;

SUMMARY
F1 AggOfF2 SumOfAMT
1 A/B 3
2 C 1
3 D 1

Thanks,
David

View 4 Replies View Related

Concatenation Of Query Text

Sep 10, 2006

Can anyone please give me an Access 2000 VB module that will concatenate [Portia - 1 query.text1] with [Portia - 1 query.text2] and type the result in textbox [Alltext]? Thanks.

View 1 Replies View Related

Modules & VBA :: Separate Numbers And String From Alpha-numeric String

Jun 7, 2013

MS-Access VBA code to separate numbers and string from an alphanumeric string.

Example:

Source: 598790abcdef2T
Output Required: 598790

Source: 5789065432abcdefghijklT
Output Required: 5789065432

View 13 Replies View Related

String Validation (string Must Start With Http://)

Mar 12, 2007

Hi all,

I was looking for some help. I am trying to setup a table with a field for web address. People are entering www.website.com etc however I need them to make sure it starts with http:// Is their any way I can put validation on the field to make sure that this is entered? Or maybe I could use an input mask?

Any suggestions would be gratefully recieved.

Andy.

View 3 Replies View Related

Search For A String Within A String

Oct 27, 2006

I have a column called CPU_S within a table called workstation that contains sample text like P111 933

I want to use the update command to search the CPU_S column for entries that contain this in there string then add P3 to a column called CPU_N

So far I have the code below but I don't know how to search a column entry for a specific string within a string. Can this be done and how?


UPDATE workstations SET CPU_N = "P4"
WHERE CPU_S = ;

View 3 Replies View Related

String Not Getting Any Value

Jun 8, 2005

It worked in acces 2000, and now am using acces 2003. Anybody any clue why the string strVoorstel would not get the value? It just returns nothing.

Here's the code:

Dim strVoorstel As String
Dim lngTel As Long
Dim strQer As String
Dim strDa As String
Dim lngNum As Long

...........

View 6 Replies View Related

SQL String

Jul 26, 2006

Hi Folks,

i am using the sql below but i am having a little syntax error:

i am trying to refer to a variable called strRAGCol


strSQL = "SELECT tblSite.SiteID, tblSite.SiteRAG, tblSite.Active " _
& " FROM tblSite " _
& " WHERE (((tblSite.Active)=Yes)AND((tblSite.SiteRAG)= strRAGCol));"

Any help much appreciated.

Mark

View 4 Replies View Related

SQL String Help Please

Sep 29, 2005

The following SQL query is returning no records when I know for a fact there are some there! Can anyone please hlp me?!

Dim strSQL As String
strSQL = "SELECT * FROM tblHirer WHERE HirerSurname= 'Forms!frmFinanceProposal!Child845!Text430'"
rsFindDuplicates.Open strSQL, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
rsFindDuplicates.RecordCount


Also, I was wondering how I would put as 2nd filter on the recordset to equal a particular date?

Cheers

View 2 Replies View Related

Sql String

Dec 16, 2004

I had a query and the sql is:

SELECT Institutions.*, Institutions.merge, Institutions.Inst_type
FROM Institutions
WHERE (((Institutions.merge)=True) AND ((Institutions.Inst_type)=[forms]![merge_inst_type]![Inst_type]));

and I had a command button which process

MergeAllWord ("select * from merge_query_true")

but I am getting an error like this "make sure the sql is correct , sql was
select * from merge_query_true

select * from merge_query_true ---- is this code ok?

If I had cut the part "AND ((Institutions.Inst_type)=[forms]![merge_inst_type]![Inst_type])); from the sql it works fine....

View 4 Replies View Related

SQL String

May 30, 2007

WHat am I doing wrong...I cannot get the syntax correct...

Form the Query Builder:

SELECT tbl_GroupMembers.GroupNumber, tbl_GroupMembers.Email
FROM tbl_GroupMembers
WHERE (((tbl_GroupMembers.GroupNumber)="10"));


NEED IT TO BE IN THIS SQL STATEMENT:

Set rs = dbs.OpenRecordset("Select * From tbl_Groups", dbOpenDynaset)

View 3 Replies View Related

String Length.

Aug 19, 2005

I have a fax number field iwhich has a mask. +(000)-00-000-000 in a table of many records.
The problem is that every record has a number in the first part of country code +(001)which must have come there by mistakes, few records have complete and true fax numbers.

I need a query that can Update this Fax_Number field where the length of the string is less than 7 digits.
Some thing like UPDATE Contacts SET Contacts.Fax_Number = ""
WHERE ((Len("Fax_Number")>"6"));

How can i do this. Thanks.

View 4 Replies View Related

How To Split Up This String

Sep 15, 2005

I have a string:

Cars > Car Import > Car Import: Car Import

The first section is the Category, the second is the Product, the third is the SubProduct and the fourth is the keyword.

What is the best way to split each of these words into its own variable? I think I can do the first and end one but not the Car Import and Car Import one.

Thanks,

Dave

View 4 Replies View Related

Lookup String

Sep 18, 2005

I have a 67 binary code string produced from a query which concatenates these 1's and 0's.

What I need to do is have access decide what a particular string value/range is and return the process name. e.g

11000000000000000000000000000000000001000010000000 00000000000000001. The process name would be COMP RESOLVED MSA


10100000000000000000000000000000000001000010000000 00000000000000001.The process name would be COMP UNRESOLVED MSA

00000000000000000111010000000110000000000000000000 00000000000000001

The process name would be MSA NEW

There could be about 60 different Process Names

View 1 Replies View Related

Please Look At This Boolean Vs String

Dec 2, 2005

I'm working on a software that was developed by someone who left the company. The problem is that the software works for all locations execpt one that is in austria, after debuging I found out that there is a statement in the code that uses boolean true or false, the only way it worked is when I put an if statement with false or true as string, ex: if doc = "true" then
buttom line has anyone faced this problem, I searched microsoft website and they said that some vb engines don't convert boolean to string. Please Please if someone has a clue try to help. Thanks.

View 4 Replies View Related

Need Help With String Formatting

Dec 15, 2005

Hey everyone, I need some help with formatting a string for use with the DoCmd.RunSQL() method. I can't figure out how the hell VB deals with escape characters for the purpse of variables inside strings. I have this line right now.

strSQL = "INSERT INTO OS (OS) VALUES(" + OS.Value + ")"


This is supposed to insert one row into the "OS" Table, in the "OS" field. In my form there is a textbox called "OS" and I'm trying to insert that value into the DB table.

Two things.
1) Yes, I know, I have a lot of things named "OS"
2) Yes, I know I don't need to use a string here, but I'm just presenting this is an abbreviated example, in my full program I do in fact need a string.

View 3 Replies View Related

String In Textbox

May 2, 2006

Hi,

I have string SELECT Field from Table:

A1
A2
A3
....

I need to see records in textbox: A1, A2, A3..

Thank You in Advance

View 1 Replies View Related







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