S
Stephen @ ZennHAUS
Hi Guys and Gals
This is kind of a revisited topic. Please refer to my post on 15/12/2008
entitled Errors loading/opening forms using command buttons.
The problem I am having is similar to the previous issue. Last time I
created forms in 2007 and when I used them in 2003 the error occurred as
described in the previous post. That was solved by creating a fresh
database in 2003 on a machine with only 2003 installed. Immediately
upgrading the database to 2003 format, then copying all of the data
structures from the old database without any code.
This case is a little different. I am still working in the new database
created in 2003 and am creating all the forms and code to drive the
interface. I created "Form A" as a blank form in design view. It has a
subform "Form A.S" in datasheet view, a label and a command button as the
only 3 controls on the form. The command button was created with the Command
Button control wizard and it's only job is to close the form. The command
button uses the following code:
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
DoCmd.Close
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub
"Form A" and "Form A.S" were both copied and modified to become "Form B",
"Form B.S" and "Form C", "Form C.S". The label was changed in both forms B
and C and the data source and fields were changed on forms B.S and C.S.
All 3 forms were working fine from the menu interface, again activated by
command buttons. After noticing a mistake in the label on form A, I changed
the label, saved the form and then previewed the form in form view. When I
clicked the Close button, I got the attached error. If the attachment does
not work, the error is fully transcribed in the previous post already
mentioned.
** it seems my initial posting of this message was rejected because my post
** contained an attached file. Please refer to my post from 15 Dec 2008 as
** mentioned earlier in this post for a full transcript of the error
message.
Forms B and C still work perfectly. I have deleted, recreated and compiled
the code in Form A, deleted the command button and recreated it from
scratch. Nothing seems to fix it. I am not inclined to recreate the form
from scratch because I have so many more forms to create, if this happens
again, I need to know how to resolve it.
Cheers
Stephen @ ZennHAUS
This is kind of a revisited topic. Please refer to my post on 15/12/2008
entitled Errors loading/opening forms using command buttons.
The problem I am having is similar to the previous issue. Last time I
created forms in 2007 and when I used them in 2003 the error occurred as
described in the previous post. That was solved by creating a fresh
database in 2003 on a machine with only 2003 installed. Immediately
upgrading the database to 2003 format, then copying all of the data
structures from the old database without any code.
This case is a little different. I am still working in the new database
created in 2003 and am creating all the forms and code to drive the
interface. I created "Form A" as a blank form in design view. It has a
subform "Form A.S" in datasheet view, a label and a command button as the
only 3 controls on the form. The command button was created with the Command
Button control wizard and it's only job is to close the form. The command
button uses the following code:
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
DoCmd.Close
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub
"Form A" and "Form A.S" were both copied and modified to become "Form B",
"Form B.S" and "Form C", "Form C.S". The label was changed in both forms B
and C and the data source and fields were changed on forms B.S and C.S.
All 3 forms were working fine from the menu interface, again activated by
command buttons. After noticing a mistake in the label on form A, I changed
the label, saved the form and then previewed the form in form view. When I
clicked the Close button, I got the attached error. If the attachment does
not work, the error is fully transcribed in the previous post already
mentioned.
** it seems my initial posting of this message was rejected because my post
** contained an attached file. Please refer to my post from 15 Dec 2008 as
** mentioned earlier in this post for a full transcript of the error
message.
Forms B and C still work perfectly. I have deleted, recreated and compiled
the code in Form A, deleted the command button and recreated it from
scratch. Nothing seems to fix it. I am not inclined to recreate the form
from scratch because I have so many more forms to create, if this happens
again, I need to know how to resolve it.
Cheers
Stephen @ ZennHAUS