Hi John
I have change all my field names to follow proper Access naming conventions.
The problem is the value that it creates does not work with the
ConcatRelated function that Allen Browne has created.
Specifically
In my query "QryPrevious" , I have a combined field consisting of two fields
called "DateLength".
[Startdate] &" - "& [SuspLength]
Startdate is a date field from a table.
The results of QryPrevious are
12/2/2009 - 3 day
12/4/2009 - 2 day
12/8/2009 - 3 day
I would to combine them into a single field, called [Alldates]. Like the
following
12/2/2009 - 3 day, 12/4/2009 - 2 day, 12/8/2009 - 3 day
What can I do with the [Startdate] &" - "& [SuspLength] so it becomes TEXT
so that the ConcatRelated can resolve it as a single value?
If I use simple values like
A
B
C
the function works fine and will make
ABC.
I hope that this makes sense, and I am sorry to all for not explaining this
very well. Thanks for taking an interest in this problem.
Prohock
John W. Vinson said:
I have a query that has one field that combines two other fields.
Date Length Combined
12/2/2009 3 Day 12/2/2009 - 3 day
I need the combined field to in plain text format.
I tried the following hoping that it would work...no luck!
Text(DateLength:[Date] &" - "& [Length])
Please help
I'm perplexed that you're having a problem at all. I agree that Date and
Length are bad choices of fieldnames, but I believe you're creating a problem
where there isn't one.
The & concatenation operator will return a Text value *whatever* the datatype
of the component fields!
The expression
[Date] & "-" & [Length]
will return a Text value, consisting of the date value in the field named Date
expressed in your computer's Regional Settings date format, followed by a
hyphen, followed by the value of Length (assuming that Length is a Text field
containing "3 Day").
Is this not what you're getting?
What prompts the question? Are you getting an error using the Concatenate
function? If so what error?