From: Prohock on
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
From: Jellifish on
FORMAT([Date],"d/m/yyyy")&" - "&[Length]

Date is a pretty bad name for a column, you should re-name it to something
more descriptive i.e. StartDate.

"Prohock" <Prohock(a)discussions.microsoft.com> wrote in message
news:86B0267B-C398-4D2F-8D5D-82DD519525D9(a)microsoft.com...
>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


From: Gina Whipp on
Prohock,

In addition to the answer you got...

I see you have fields named Date and Length. These are Reserved Words and
will cause you issues as they are issues for Access. Consider changing
them. For a complete list see...

http://allenbrowne.com/AppIssueBadWord.html

For naming conventions see...

http://www.granite.ab.ca/access/tablefieldnaming.htm

http://www.regina-whipp.com/index_files/NamingConventions.htm

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Prohock" <Prohock(a)discussions.microsoft.com> wrote in message
news:86B0267B-C398-4D2F-8D5D-82DD519525D9(a)microsoft.com...
>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


From: theDBguy on
Hi,

Is this in an Access Query? I only ask because I think TEXT() is an Excel
function and Date and Length are "reserved" words in Access.

You might consider renaming your fields to something else and then try
something like:

Combined: Format([DateField], "mm/dd/yyyy") & " - " & [LengthField]

Hope that helps...

"Prohock" wrote:

> 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
From: Prohock on
Thanks for the suggestions.

The problem I am having is that I need the combined field to be a TEXT field
in order to run the ConcatRelated function that Allen Browne created.
Currently access can't resolved the combined fields. If they were seen as
TEXT then it could be resolved. Any ideas?

"Jellifish" wrote:

> FORMAT([Date],"d/m/yyyy")&" - "&[Length]
>
> Date is a pretty bad name for a column, you should re-name it to something
> more descriptive i.e. StartDate.
>
> "Prohock" <Prohock(a)discussions.microsoft.com> wrote in message
> news:86B0267B-C398-4D2F-8D5D-82DD519525D9(a)microsoft.com...
> >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
>
>
> .
>