So for years now I've had a minor but annoying problem with my database. I've tried on numerous occasions to get to the bottom of it but always failed. I've read through hundreds of forum posts but still not figured it out. Today I'm absolutely determined to solve it.
I have an Access 2010 front end connected to a MySQL back end.
I have various bound forms with the Allow Additions options disabled. Additions are created by clicking on my create new record buttons which hard code an SQL query and insert new records before performing a re-query. Each of these forms displays currently live records. If there are no currently live records, thanks to Allow Additions being disabled, everything in the detail area of my main form disappears leaving only the buttons I created in the form header. This is exactly how it should work.
The problem occurs when I try and close any of the aforementioned forms. I always get the No Current Record error message.
Now before any of you clever chaps say "Trap for error number 3021", even though 3021 has the same description, this variant is not 3021.
See the following screenshot: http://bit.ly/QEeSS9
I have no idea what's causing this or how to stop it. I have no code running on the on close event of my forms but this behaviour occurs on multiple forms.
A zip file of my database front end can be downloaded here: http://bit.ly/TKWZhu it's the whole thing so there are stacks of tables, queries and forms but if you open the consignments_new_consignment form this is one example of where it occurs.
I have an Access 2010 front end connected to a MySQL back end.
I have various bound forms with the Allow Additions options disabled. Additions are created by clicking on my create new record buttons which hard code an SQL query and insert new records before performing a re-query. Each of these forms displays currently live records. If there are no currently live records, thanks to Allow Additions being disabled, everything in the detail area of my main form disappears leaving only the buttons I created in the form header. This is exactly how it should work.
The problem occurs when I try and close any of the aforementioned forms. I always get the No Current Record error message.
Now before any of you clever chaps say "Trap for error number 3021", even though 3021 has the same description, this variant is not 3021.
See the following screenshot: http://bit.ly/QEeSS9
I have no idea what's causing this or how to stop it. I have no code running on the on close event of my forms but this behaviour occurs on multiple forms.
A zip file of my database front end can be downloaded here: http://bit.ly/TKWZhu it's the whole thing so there are stacks of tables, queries and forms but if you open the consignments_new_consignment form this is one example of where it occurs.