Adding a suffix/prefix to a field? (1 Viewer)

TidusBlade

Watermelon Knight
Local time
Today, 22:54
Joined
Jan 26, 2009
Messages
6
I know the answer might be really obvious, but 20 minutes of googling didn't help and so I came here :) I also tried searching the forums, but nothing to what I am trying to do.

I have a table storing records for DVD burners, and one of the fields is DVD_Access_Time which is an integer. One of the records might have the value 120 for that field, and I was wondering if it's possible to suffix the the 120 with the two letters "ms". So when I looks at the table in datasheet, I see all DVD_Access_Time values ending in ms, like 120ms, 110ms etc. I tried looking around to see if it's possible to do that in a form, but came up short, seems it dosen't work for number fields. I know number fields can't hold letters (But I saw that Autonumbers can be prefixed and they are a long integer) so maybe there is a way to add the suffix only for the form and leave the database intact. I was able to find this while googling but I guess it also only works for text fields:
Code:
UPDATE Comp_BURN SET Comp_BURN.DVD_Access_Time = DVD_Access_Time & "ms";
The only idea I could come up with is to change the field to a text and continue from there...

Any suggestions on a solution would be greatly appreciated :D
Thanks!
 
Last edited:

DCrake

Remembered
Local time
Today, 19:54
Joined
Jun 8, 2005
Messages
8,626
It seams to me that this is for cosmetic reasons and is not critical to the actual data.

In that case you can use a query to concatenate the ms to the end of the value

Such As

Duration:CStr([YourFieldName]) & "ms".

It is usually bad practice to change data via a datasheet.

David
 

KenHigg

Registered User
Local time
Today, 14:54
Joined
Jun 9, 2004
Messages
13,327
I second Davids suggestion -
 

TidusBlade

Watermelon Knight
Local time
Today, 22:54
Joined
Jan 26, 2009
Messages
6
Thanks for the quick reply buddy :)

And yeah guess it's cleaner and better, thanks for the tip!
 

Users who are viewing this thread

Top Bottom