I have a field( text type) of fileld length =250 in a table. If the actual data contained in this field is 10 characters will the data base still consume 250 byte or it will consume according to the actual data in it ( in this case 10 bytes).
Well I can only speak for Access 97 as that is what I have in front of me, but this should apply for roughly for all versions of Access. The fact that when a Access database is created it contains system tables anyway. So a database with no (excluding system tables) tables or forms, etc in it will still be about 59, 392 bytes in size. Although, regarding your question, adding a table with one field (250 bytes in size) but with no data adds no weight to the overall database size. However, once you've entered data (I entered a 10 byte string) into that table the db size leaps to 67, 584 bytes. If you then enter a text string 250 bytes long, it stays at 67, 584 bytes. So it does seem that Access reserves the 250 bytes set aside for that field, but only after data has been entered into that field. Hope this answer your question. May I ask as to why you are so worried about such small differences in file size?
My data base consists of a table which has large number of text fields. Though the actaual data will be about 30-40 characters per field on an average but once in a blue moon it can be as long as 240 characters in any of thses text fields . Keeping worst case scenario in mind, the record size is comming to be about 15000 bytes. I also know the expected growth rate of the number of records in the table. If the data base will consume maximum size irrespective of actual data, then on Access 97, it may suffice only for 2-3 years, which is my worry
If this data is being entered through a form, there is a VBA function that would resize the data size of a field so, for example, after the data has been entered in the textbox on a form, the code would run to see whether the entered string is bigger than the current field size, and if it is, it simply re-adjusts the field size to accomodate.