General discussion

Locked

Access 03 odbc call: data over two forms

By monkeybasket2001 ·
Hi,

Basically i have a form with some fields on; after fillingin the required and saving the user has an option to continue to fill more data on a second form.

The form is opened and the ID number is copied from the original (hence the need to save first) this then allows the user to enter against more fileds attached to that record.

The problem is when i come to try and save of exit it. For some reason i get an odbc call fail:

cannot insert the value Null(3306) into datelogged, js pastoral log, insert fails (515).

the date logged is a field only on the original form and not on the new one- and i onkly get the error on the new form not the original one, also the field is populated once the user starts to write (using the environ function)- so is a timestamp which doens't allow nulls and will always populate with a value-

for some reason when trying to write back against the record its seeing the date logged value as null- even though it isn't- ive changed the 'allow nulls' value on the table column to bypass this but it then does the same with the next field which wont allows- ive tried copying the field to the new form and looking at what the value is when its on the new form and all is fine so im at a loss as to why access sees this as a null and throws up an error.

any ideas?

greg

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by user@# In reply to Access 03 odbc call: data ...

Just a thought-- is that field still in the database even though it is not in the form? It could be Access is trying to write a value to a field that stilll exists but has not been supplied through the form.

Collapse -

by BSchmidt In reply to Access 03 odbc call: data ...

Does it pull in any other fields from the first form, or just the timestamp? Do you have any WHERE clauses or anything telling the second form to specifically go to the record that the first form was on (other than the timestamp)? I've had similar problems with tying keyed fields before and ended up just having to take the relationship out completely to make it work.

Check the WHERE clause on your query (if applicable) or whatever connection pulls up that record by that field. Also if you're connecting between multiple tables check that connection too, I seem to remember my problem being related to the way the tables were connected. Perhaps overwriting the timestamp when the second form is opened would fix it? (actually overwriting the data rather than just referencing it) Good luck.

Collapse -

by BSchmidt In reply to Access 03 odbc call: data ...

Does it pull in any other fields from the first form, or just the timestamp? Do you have any WHERE clauses or anything telling the second form to specifically go to the record that the first form was on (other than the timestamp)? I've had similar problems with tying keyed fields before and ended up just having to take the relationship out completely to make it work.

Check the WHERE clause on your query (if applicable) or whatever connection pulls up that record by that field. Also if you're connecting between multiple tables check that connection too, I seem to remember my problem being related to the way the tables were connected. Perhaps overwriting the timestamp when the second form is opened would fix it? (actually overwriting the data rather than just referencing it) Good luck.

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums