469,607 Members | 2,193 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

Help with Form_Load calls and Enter Parameter Value issues

I am having 2 issues, both acting very randomly, and for the most part
I dont get this message on most computers, but I have had a couple
computers get either issue 1, or issue 2.

Issue #1: I have a module that has a function that starts as:
Function setFormColors(frm As Form)
This function takes a form and looks through its objects and if
certain object names meet a certain critera (such as start with lblBD)
do a certain action (like make the label bold).

Then in each forms code I have:
Private Sub Form_Load()
setFormColors Me
End Sub

The computers that dont like it, are telling me that setFormColors Me
is having a type mismatch error. I wish I knew why since this call
DOES work on 90% of computers.

Issue #2: I am having some computers give a 'enter parameter value'
message when a customer closes one or more certain forms. One of the
close button's codes follows:

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

If IsNull(Me.Discount) Then
Me.Discount = 0
End If

DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD

DoCmd.Close acDefault, frmJob

Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description

End Sub

Please let me know if anyone knows what is going on. Thanks so much.

I started developing this program when Access first came out, and SOME
forms havent been changed in their calls. I now develop in Access XP.
This program works on a lot of computers, so I am stumped why a
couple computers are having issues.

Thanks for your help.
-Phil Seguin
Nov 12 '05 #1
3 5312
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Issue #2:

You can eliminate the OnClose event by setting the Discount column's
default to zero.

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP7lweoechKqOuFEgEQI8SgCg5n7vTT2DK1DieL8h2hrKeL FqLbYAn1Du
ZXnBfXlpi+kESY8O8z/3bmu/
=UILa
-----END PGP SIGNATURE-----

Phil IU Guy wrote:
I am having 2 issues, both acting very randomly, and for the most part
I dont get this message on most computers, but I have had a couple
computers get either issue 1, or issue 2.

Issue #1: I have a module that has a function that starts as:
Function setFormColors(frm As Form)
This function takes a form and looks through its objects and if
certain object names meet a certain critera (such as start with lblBD)
do a certain action (like make the label bold).

Then in each forms code I have:
Private Sub Form_Load()
setFormColors Me
End Sub

The computers that dont like it, are telling me that setFormColors Me
is having a type mismatch error. I wish I knew why since this call
DOES work on 90% of computers.

Issue #2: I am having some computers give a 'enter parameter value'
message when a customer closes one or more certain forms. One of the
close button's codes follows:

Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click

If IsNull(Me.Discount) Then
Me.Discount = 0
End If

DoCmd.DoMenuItem A_FORMBAR, A_FILE, A_SAVERECORD

DoCmd.Close acDefault, frmJob

Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description

End Sub

Please let me know if anyone knows what is going on. Thanks so much.

I started developing this program when Access first came out, and SOME
forms havent been changed in their calls. I now develop in Access XP.
This program works on a lot of computers, so I am stumped why a
couple computers are having issues.

Thanks for your help.
-Phil Seguin

Nov 12 '05 #2
Thank you for your help, but I do not think that is the issue. If it
is the issue, then can you please explain to me why setting the
discount would be prompting some, but not all users for a parameter
value when clicking the close button. Thank you.

-Phil Seguin
Hash: SHA1

Issue #2:

You can eliminate the OnClose event by setting the Discount column's
default to zero.

HTH,

MGFoster:::mgf
Oakland, CA (USA)

Nov 12 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You're right. I saw cmdClose and misinterpreted it as Form_Close.

The only thing setting the Discount default value to zero would do
would enable you to get rid of this:

If IsNull(Me.Discount) Then
Me.Discount = 0
End If

in the cmdClose_Click event.

==

It would seem that when your form(s) close a query is run that demands
a query parameter. Check the BeforeUpdate, AfterUpdate event
procedures to see if they are opening a query, or a report, or
something that runs a query. You could also check your queries for
the parameter named in the pop-up parameter request box.

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP7p2IIechKqOuFEgEQIBIwCgo34lGoHZZ9oTXVHZYev2Zp dTA/8AoOn3
/kJVuA4HTVLXr/3ZSmoVeAwC
=08st
-----END PGP SIGNATURE-----
Phil IU Guy wrote:
Thank you for your help, but I do not think that is the issue. If it
is the issue, then can you please explain to me why setting the
discount would be prompting some, but not all users for a parameter
value when clicking the close button. Thank you.

-Phil Seguin

Hash: SHA1

Issue #2:

You can eliminate the OnClose event by setting the Discount column's
default to zero.

HTH,

MGFoster:::mgf
Oakland, CA (USA)


Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Jay | last post: by
22 posts views Thread by Amali | last post: by
5 posts views Thread by cherriecheng88 | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.