Null value for ACCESS 
Author Message
 Null value for ACCESS

Good morning,

Ok here is one I have been fighting with for a few days. I have a VB6
front end that ties into a MS Access 2000 database. The front end has
many textboxes some of which will not be used buy every user. These
textboxes are bound to the database and work fine except in one case..
if the user enters data in the textbox and then decides to remove it (
ie. just backspace and leave it blank ), Access will not except it
when I try to update that field. The first issue is that the Access
database must be set to not allow a zero length field ( decision made
above my head ) otherwise it would go in with no problems. The second
is that the powers that be do not want to use a blank space entered
into the field to achieve a non zero length field. So the the big
question is how to I add a NULL that Access will accept? I dont think
VB NULLs are quite the same in the translation. Any help would be
great..... Thanks..



Sun, 11 Dec 2005 21:23:34 GMT  
 Null value for ACCESS

Quote:

> Ok here is one I have been fighting with for a few days. I have a VB6
> front end that ties into a MS Access 2000 database. The front end has
> many textboxes some of which will not be used buy every user. These
> textboxes are bound to the database and work fine except in one case..
> if the user enters data in the textbox and then decides to remove it (
> ie. just backspace and leave it blank ), Access will not except it
> when I try to update that field. The first issue is that the Access
> database must be set to not allow a zero length field ( decision made
> above my head ) otherwise it would go in with no problems. The second
> is that the powers that be do not want to use a blank space entered
> into the field to achieve a non zero length field. So the the big
> question is how to I add a NULL that Access will accept? I dont think
> VB NULLs are quite the same in the translation. Any help would be
> great..... Thanks..

VB Nulls ARE the same, and indeed are what you want to use.

e.g.
    rs.Fields("Some Field").Value = _
        IIf(txtSource = "", Null, txtSource)



Sun, 11 Dec 2005 21:32:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Regarding passing a null value in Access-97

2. Null value in access database

3. Null value for ACCESS

4. How do I insert a Null value into Access Database

5. writing null values to Access DB via ASP

6. passing null value into access db

7. How can I pass NULL value to WinAPI which is expecting a NULL pointer

8. Sending null strings and NULL values

9. Null-Value during database access.

10. Null date values in Date/Time fields in Access DB

11. VB5, Access And Null Values

12. Null value supported in Access?

 

 
Powered by phpBB® Forum Software