Losing text character when concatentating 2 fields

S

Steve S

Have 2 fields, Mintime and Maxtime, in table Fees. Bote field lengths are 4
and input masks are 0:00;;_. when user enters 324 value is stored as 3:24.
so far -so good.

The sql :
SELECT Fees.MinTime, Fees.MaxTime, [MinTime] & " -" & [MaxTime] AS T
FROM Fees
WHERE (((Fees.MinTime) Is Not Null));

Produces
1:34 2:13 134 - 213

what I expected is:
1:34 2:13 1:34 - 2:13

Where did the ":"s dissapear to when I concatentate the fields???

Same thing happens when I concatentate the fields in a report.

what gives???

Any and all help is appreciated
 
A

Allen Browne

You may be able to get around this by explicitly formatting the calculated
field in the query:
Format([MinTime], "0\:00") & " - " & Format([MaxTime], "0\:00") AS T

Or, there may be a deeper underlying issue about what data types these are,
and what data is actually being stored in the field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top