Losing text character when concatentating 2 fields

  • Thread starter Thread starter Steve S
  • Start date Start date
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
 
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.
 
Back
Top