![]() |
|
|
#1 |
|
Junior Member
Join Date: Dec 2004
Posts: 4
|
Invalid Use Of Null
Hi,
I have a field: Ship_To defined Varchar 6 Length. When I create the record (.AddNew) I don't put any value in the field. When I read the field: lblShipTo(intX).Caption = .Fields("Ship_To") I get an error "Invalid use of Null". What am I doing wrong? |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jul 2004
Posts: 167
|
Re: Invalid Use Of Null
That field is probably marked as NOT NULL. Meaning you can put an empty space in it '' but not a NULL space which is different. If you need to have NULL values you'll need to change the field. Alternatively, when you enter data, just say '' instead of entering nothing in the field.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Dec 2004
Posts: 4
|
Re: Invalid Use Of Null
Azkaban, Thank You for responding. I'm using Navicat as the front end the last option by the field is allow null which I have checked. So does that me every time I create a record I have to assign a space (field="") to the field? That could be VERY cumbersome & error prone i.e. every time you add a field you'd have to modify your program to set the field to ""!
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Will Paypal you $20 to write this one line select query | Synpax | General | 4 | 02-16-2005 07:58 PM |
| fetching null values from a table. | sameer78 | Navicat Support | 1 | 01-17-2005 09:27 AM |
| MYSQL-Reordering Problem | JsS | SQL syntax | 14 | 11-09-2004 11:21 PM |
| Out of my depth | johnmysql | General | 2 | 11-09-2004 10:33 AM |
| How do you set up a Date field to automatically put in the current date when NULL? | MichaelPark | General | 12 | 10-21-2004 12:37 AM |