Forum Moderators: coopster & phranque

Message Too Old, No Replies

access db field question

         

click watcher

11:07 pm on Nov 26, 2001 (gmt 0)



have just realised an error i've made,

asp page inserting into an access database

i've a form field of 4 characters into which the customer inserts a number,
now a number could begin with a zero ... i've realised that if this is the case access "looses" the leading zero(s) when the number is inserted to the db,

eg 0034 is inserted as 34

i don't want to loose the digits, what should i do, my guess is make it a text field, but do i have an option? i'd like to keep it as a number if possible.

maverick

6:29 pm on Nov 27, 2001 (gmt 0)

10+ Year Member



You can accomplish that by setting first making sure your field data type is a number and then modify the field format this way:

(this is on access 97)

Format : 0000

this way it automatically convert the number for you.

Hope this helps.

maverick

sugarkane

10:22 pm on Nov 27, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



maverick, welcome to wmw and thanks for the answer :)