Formating date in a merge field

Ants

Registered User.
Local time
Today, 20:48
Joined
Aug 2, 2000
Messages
11
I have used the following code in the control source of a field to merge two fields:

=[Account Ref] & "" & [Year]

When I go to preview the report, I notice that the field is fine with the account ref part, however the year section is returned with the time and today's date.

The field [Year] has its control source set at Now() with format as yy (This appears fine in the report preveiw).

I hav tried using Date()in this field, but whenever I go to report preveiw it asks me for the parameter value.

I look forward to anybody's help
 
Try:

=[Account Ref] & "" & Format([Year],"yyyy")
for "AcRef2000"
or
=[Account Ref] & "" & Format([Year],"yy")
for AcRef00

HTH

Ian
 
Many thanks for the reply.

However after entering in your new expression I get the message about the expression containing invalid syntax. I copied the expression as it appears on this site.

=[Account Ref] & "" & Format([Year],"yy")

Any suggestions!
 
=[Account Ref] & "" & Format([Year],"yy")

If you want the items concantenated then take out the "". If you want a space add " " instead of "".

Make sure the field names I've used are exactly the same as the ones you have.

Should sort it.
Else reply
 

Users who are viewing this thread

Back
Top Bottom