November 17th, 2004, 02:43 PM
I have an access form that is attached to a bit of data. The only thing is that if I create a new record and decide I don't want to do it at this time I get all the null errors.
If I pick the phone number field and put in a space bar I will get the null error. If I delete it I will get the run time error. How can I fix this?
November 17th, 2004, 03:40 PM
Which version of Access are you running?
Your basic problem is that when the app was built, certain fields were declared as mandatory, had a parameter check, or a data type check added to them.
You also seem to have an automatic record key generation routine running?
What seems to be happening is that when you try to skip a mandatory field it will "cough" if you try to delete the record, it has already assigned the unique number, and does not want gaps in the sequence..............or maybe the delete option has been disabled.
Are you using this in a "trusted" environment, or does it have to be idiot proof?
I will need to try out a couple of things depending on your version..............most of my development has been Office 4.3 or Office 97, but I do have 2000 and 2002 (XP).
Are you prepared to have incomplete records on your main database? In which case you can just remove the checks. Otherwise treat it as batch processing and create a mirror "Form" and "Table"....run an audit/update query against this "pseudo batch" table, and let the query update the main table with complete records.
I need a bit more information
November 17th, 2004, 06:58 PM
I am currently running Office 2000 for this process. I checked the fields to see if their was any update commands that were left by the previous designer, but can't seem to see what would be causing the errors.
November 17th, 2004, 08:15 PM
It is trusted, but as close to idiot proof the better.
November 17th, 2004, 08:18 PM
1. Create an exact copy of the database with a different name (.mdb).............for obvious reasons
2. Open Access, and open the database.
3. Click on the "Tables" tab
4. Select "design view"
5. In the "Table properties" column, right click and check what is in there for "validation rules", "validation text", "filter"
6. At the bottom check out if there is anything in "lookup"
Normally, you create tables or queries, then the forms from them to keep the fields and rules identical.
Does that mean if you enter space in the field? or if you put in something like 123 456 789, instead of 123456789?
If I pick the phone number field and put in a space bar
Can you try <tab> and the arrow keys to exit fields.............."space" is not "null".........it is a value, whereas null is blank?...........that might cause an error?
I will fire up an Office 2000 box tomorrow and get myself a more level playing field.
Let's get it working first, we can beef it up and idiot proof it later..............well that's the way I build them
November 17th, 2004, 08:28 PM
error: You tried to assign the Null value to a variable that is not a Variant data type.
I don't have access to alter the tables, just create the reports, forms and queries.
November 17th, 2004, 08:50 PM
OK, that is null into a field that requires a value of a particular data type. Typically this would be a date field?
Are you keying these values or transferring them?......................I have had great fun trying to transfer AS/400 data into Unix
In your test DB try changing the field type to text/alphanumeric...................it should allow anything then?