Blank field carries data?

bknight
BronzeLounger
Posts: 1389
Joined: 08 Jul 2016, 18:53

Blank field carries data?

Post by bknight »

How is it possible for a blank field to have data or is not null?
I was running my profit subroutine and it looks for null values to compare with current values. The problem was the field was blank but in code it showed a value. How does/did this occur?

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Blank field carries data?

Post by HansV »

If the field is really not null, there must be a problem with your code. Perhaps it looks at the wrong record, or at the wrong field?
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1389
Joined: 08 Jul 2016, 18:53

Re: Blank field carries data?

Post by bknight »

Nope the code works, finding a value in the field even though it is visually blank. I finally entered a value so that it looks better. The particular record I'm referring is not searched in code for a null, but when a null is found then the calculation is put in that field. but code would not enter the calculation into that field.
The image shows the last record which was the issue, that will be compared to the top record in the image and this is the record that has the null. The correct profit value was hand entered. The value the code detected a value of 25.76. But would not overwrite that value with the correct value as shown.
I was wondering what would allow an error such as this?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Blank field carries data?

Post by HansV »

Sorry, no idea.
Best wishes,
Hans

bknight
BronzeLounger
Posts: 1389
Joined: 08 Jul 2016, 18:53

Re: Blank field carries data?

Post by bknight »

The funny aspect if it is the last record in the Db a calculation will be made and edited into the field even overwriting what was there. Just not a "null" that wasn't.
You do not have the required permissions to view the files attached to this post.