How to handle a series of forms?

G

Guest

I have 3 forms. There is a button on form A to call form B. But form B has no button. Form B will display something like "The system is in progress. Please wait". I have code on form B On_load to perform tables update. After the the update complete, the code will call form C to display "Progress is completed." and has a close button. So far it seems ok but at form C when the close button is click, I got a error message says :

The expression On Click you entered as the event property setting produced the following error: A problem occured while ERP System was communicating with the OLE server or ActiveX Control.
* The expression may not result in the name of a macro, the name of a user-defined function, or a [EventProcedure]
* There may have been an error evaluting the function, event or macro

Here are my codes:
form A:
Private Sub Proceed_Click()

<lines of codes>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization1", WindowMode:=acDialog

End Sub

form B:
Private Sub Form_Load()

<lines for table update>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization2", WindowMode:=acDialog

End Sub


from C:
Private Sub Close_Click()

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmInventoryMenu", WindowMode:=acDialog

End Sub


Very much appreciated for advise. Thanks
 
D

dawn

check your openform syntax should be something mor like
this - not all properties need to be there but you need to
provide the comma if you skip one - I've never seen the :=
syntax used in access

DoCmd.OpenForm "Advisor Dialog Box", acNormal, , , ,
acWindowNormal
-----Original Message-----
I have 3 forms. There is a button on form A to call form
B. But form B has no button. Form B will display
something like "The system is in progress. Please
wait". I have code on form B On_load to perform tables
update. After the the update complete, the code will call
form C to display "Progress is completed." and has a close
button. So far it seems ok but at form C when the close
button is click, I got a error message says :
The expression On Click you entered as the event property
setting produced the following error: A problem occured
while ERP System was communicating with the OLE server or
ActiveX Control.
* The expression may not result in the name of a macro,
the name of a user-defined function, or a [EventProcedure]
 
B

Brendan Reynolds

Not meaning to be picky, Dawn, but in the interest of accuracy, the := is
perfectly valid VBA syntax for passing named arguments.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


dawn said:
check your openform syntax should be something mor like
this - not all properties need to be there but you need to
provide the comma if you skip one - I've never seen the :=
syntax used in access

DoCmd.OpenForm "Advisor Dialog Box", acNormal, , , ,
acWindowNormal
-----Original Message-----
I have 3 forms. There is a button on form A to call form
B. But form B has no button. Form B will display
something like "The system is in progress. Please
wait". I have code on form B On_load to perform tables
update. After the the update complete, the code will call
form C to display "Progress is completed." and has a close
button. So far it seems ok but at form C when the close
button is click, I got a error message says :
The expression On Click you entered as the event property
setting produced the following error: A problem occured
while ERP System was communicating with the OLE server or
ActiveX Control.
* The expression may not result in the name of a macro,
the name of a user-defined function, or a [EventProcedure]
* There may have been an error evaluting the function, event or macro

Here are my codes:
form A:
Private Sub Proceed_Click()

<lines of codes>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization1", WindowMode:=acDialog

End Sub

form B:
Private Sub Form_Load()

<lines for table update>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization2", WindowMode:=acDialog

End Sub


from C:
Private Sub Close_Click()

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmInventoryMenu", WindowMode:=acDialog

End Sub


Very much appreciated for advise. Thanks
.
 
G

Guest

Hi, in all my programs, I use the same syntax as usually I cut and paste them. In my case, form A and B are closed perfectly except form C. Since I don't catch the exact meaning of the error message, I got stuck.

Brendan Reynolds said:
Not meaning to be picky, Dawn, but in the interest of accuracy, the := is
perfectly valid VBA syntax for passing named arguments.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


dawn said:
check your openform syntax should be something mor like
this - not all properties need to be there but you need to
provide the comma if you skip one - I've never seen the :=
syntax used in access

DoCmd.OpenForm "Advisor Dialog Box", acNormal, , , ,
acWindowNormal
-----Original Message-----
I have 3 forms. There is a button on form A to call form
B. But form B has no button. Form B will display
something like "The system is in progress. Please
wait". I have code on form B On_load to perform tables
update. After the the update complete, the code will call
form C to display "Progress is completed." and has a close
button. So far it seems ok but at form C when the close
button is click, I got a error message says :
The expression On Click you entered as the event property
setting produced the following error: A problem occured
while ERP System was communicating with the OLE server or
ActiveX Control.
* The expression may not result in the name of a macro,
the name of a user-defined function, or a [EventProcedure]
* There may have been an error evaluting the function, event or macro

Here are my codes:
form A:
Private Sub Proceed_Click()

<lines of codes>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization1", WindowMode:=acDialog

End Sub

form B:
Private Sub Form_Load()

<lines for table update>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization2", WindowMode:=acDialog

End Sub


from C:
Private Sub Close_Click()

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmInventoryMenu", WindowMode:=acDialog

End Sub


Very much appreciated for advise. Thanks
.
 
B

Brendan Reynolds

Unfortunately, Peter, that error message doesn't *have* an exact meaning.
It's a catch-all error message that can occur under various circumstances.
Sometimes (not always, but sometimes) when it happens during development it
is a sign that the VBA project is corrupted, and you need to create a new,
empty MDB and import everything from the old one.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Peter said:
Hi, in all my programs, I use the same syntax as usually I cut and paste
them. In my case, form A and B are closed perfectly except form C. Since I
don't catch the exact meaning of the error message, I got stuck.
Brendan Reynolds said:
Not meaning to be picky, Dawn, but in the interest of accuracy, the := is
perfectly valid VBA syntax for passing named arguments.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


dawn said:
check your openform syntax should be something mor like
this - not all properties need to be there but you need to
provide the comma if you skip one - I've never seen the :=
syntax used in access

DoCmd.OpenForm "Advisor Dialog Box", acNormal, , , ,
acWindowNormal

-----Original Message-----
I have 3 forms. There is a button on form A to call form
B. But form B has no button. Form B will display
something like "The system is in progress. Please
wait". I have code on form B On_load to perform tables
update. After the the update complete, the code will call
form C to display "Progress is completed." and has a close
button. So far it seems ok but at form C when the close
button is click, I got a error message says :

The expression On Click you entered as the event property
setting produced the following error: A problem occured
while ERP System was communicating with the OLE server or
ActiveX Control.
* The expression may not result in the name of a macro,
the name of a user-defined function, or a [EventProcedure]
* There may have been an error evaluting the function,
event or macro

Here are my codes:
form A:
Private Sub Proceed_Click()

<lines of codes>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization1",
WindowMode:=acDialog

End Sub

form B:
Private Sub Form_Load()

<lines for table update>

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmStockTakeInitialization2",
WindowMode:=acDialog

End Sub


from C:
Private Sub Close_Click()

DoCmd.Close acForm, Me.name
DoCmd.OpenForm FormName:="frmInventoryMenu",
WindowMode:=acDialog

End Sub


Very much appreciated for advise. Thanks
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top