Empty field generates "0" entries? How to avoid?

  • Thread starter Thread starter StargateFanFromWork
  • Start date Start date
S

StargateFanFromWork

We have a field that used to contain an old numbering system. Since the
first 1000 dockets we have use that number, it will be a long time before we
could even think of deleting the field from the database even though we're
now under a "new" system. So the old user-input docket tracking number is
no longer used but the field still exists. The problem is that every time a
new record is created, the field gets populated with a zero which is
wreaking a bit of havoc with one of our reports. Even though we use "trim"
and CanShrink, header text is shown in the report where it would otherwise
be blank because of that "0", it seems. It would be a pain to keep having
to go back into a datasheet view of the database and deleting those zeros.
Am hoping someone here knows how to avoid A2K creating those zeros.

Thank you!
 
Go to the table, open it in Design view, click on the field in question, and
delete the 0 from its Default Value property. Save the table and close it.
 
The problem is that every time a
new record is created, the field gets populated with a zero

Open the table in design view. Select this field.

At the bottom left of the screen are the field's properties; one of
them is the Default Value. Infuriatingly, Access assumes that every
numeric field should default to 0 (which is sometimes a good idea, but
often isn't!) Just blank this property out and it will quit inserting
unwanted zeroes.

John W. Vinson[MVP]
 
Open the table in design view. Select this field.

At the bottom left of the screen are the field's properties; one of
them is the Default Value. Infuriatingly, Access assumes that every
numeric field should default to 0 (which is sometimes a good idea, but
often isn't!) Just blank this property out and it will quit inserting
unwanted zeroes.

John W. Vinson[MVP]

Thank you, Ken, and thank you, John! I went in and found that value
right away and deleted the zero. The list of things to do on first
creating A2K is getting longer and longer <g>. Now I'll look for all
numeric fields when first created to delete that default "0" value!
:oD

In desperation, since it takes an inordinate amount of time to get
even minor things fixed in this db, I opened the table though it was
linked and made the change. Everything seemed to work just fine even
after that but I thought I should ask what sort of problems one can
have with a linked table (i.e., split into front end and back end)?
<sigh>.

I'm to go in tomorrow, so I'll re-open db to see if everything still
working okay.

Cheers! :oD
 
You changed the Default Value setting of the table using the front end to
which it was linked? That will not change the property in the table itself.
You must make all table design changes in the backend where the tables
actually exist.

Good luck.
 
You changed the Default Value setting of the table using the front end to
which it was linked? That will not change the property in the table itself.

You must make all table design changes in the backend where the tables
actually exist.

Ah, okay. I know where the backend is. I'll give it a try today.
Thanks for the tip!
Good luck.

Thank you. I hope it goes okay. :oD
 
Note one other place you may need to change the Default Value -- you may
need to change it in the design view of the form where you do the data
entry. The textbox that is bound to that field would have inherited the
Default Value from the field when you first created the textbox, so the
textbox may still have a zero in its Default Value; if yes, delete it from
there too.
 
Ken Snell (MVP) said:
Note one other place you may need to change the Default Value -- you may
need to change it in the design view of the form where you do the data
entry. The textbox that is bound to that field would have inherited the
Default Value from the field when you first created the textbox, so the
textbox may still have a zero in its Default Value; if yes, delete it from
there too.

Thank you for this! I checked and the Default Value in the Data tab of the
properties of this particular field is blank in the form. That's great.

I also will wait till everyone is gone tonight before changing the default
value of the field in the table in the BE. I figure it will be safer (?) as
there are usu. 1 or 2 or more users using the database at any given moment.

Thanks. :oD
 

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

Back
Top