In the student information management system, I recorded some errors and found the answer. But I want to declare that there are many reasons for this error. The solution I proposed is only a situation I encountered. Not comprehensive. In the future, we will continue to improve the performance in other situations.
1.
Problem: the length of the inserted data exceeds the length of the field defined in the database.
Solution: Modify the length of the database field or the length of the inserted data.
2.
Problem: Code: dim mybookmark as Boolean
Solution: change it to dim mybookmark as variant. In the future, do not worry about this problem. Check the parameter type.
3.
Problem: it is wrong to perform operations on an object after it is uninstalled.
Solution: Adjust the statement Sequence Structure, understand load events and show events, and use them flexibly.
Load is to load the form into the memory and cannot be displayed;
Unload is opposite to load. Unload the form.
Show is to display the form. Before the display, the implicit operation is to load the form to the memory.
Hide is opposite to show. It hides the form, although invisible, but the form is still in memory.
4.
Problem: The dtpicker. value control is used in the code, but the dtpicker control cannot be found in the form.
Solution: add the control first and write the code.
5.
Problem: some statements are logically disordered and recordset. Close occurs, but then record sets, such as recordset. EOF, are used.
Solution: clear your mind.