MSGBOX Issues

J

James

I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James
 
F

fredg

I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James

It works for me.
Are you sure you don't have an invisible control hidden where you are
clicking on the form. You must click on a blank space on the form.
 
J

James

I have a flashing Label? Would that stop it?? Its the only
thing on there which does anything and I have a label...

Thats about it??

Thanks

James
 
J

James

If what I said would stop it is there anyway I could get
my MSGBOX to work with my flashing Label?

Many Thanks

James
 
F

fredg

If what I said would stop it is there anyway I could get
my MSGBOX to work with my flashing Label?

Many Thanks

James

A flashing label would not cause the code not to run.... as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click event?
(The Form click event is not the same as the Detail Click event.
If you are clicking in the Detail section, place the code in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and step through
line by line.
 
J

James

I have done this and Still nothing??

I have made sure that everything works... the only thing
wrong is when I actually click the form it does nothing
when as you say it works for you...

Is there anything else I can do?

Many Thanks

James
-----Original Message-----
If what I said would stop it is there anyway I could get
my MSGBOX to work with my flashing Label?

Many Thanks

James
on
the form.

A flashing label would not cause the code not to run.... as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click event?
(The Form click event is not the same as the Detail Click event.
If you are clicking in the Detail section, place the code in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and step through
line by line.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
M

MikeB

James said:
I have done this and Still nothing??

I have made sure that everything works... the only thing
wrong is when I actually click the form it does nothing
when as you say it works for you...

James,
I have tried your code in AC2000 and AC2002. I verify that it does NOT work.

Perhaps Fred clicked on the body of his test form and invoked the property dialog without looking at
the header of the dialog. The dialog that comes up is for the Detail properties and indeed if you add an
onClick event to the Detail section, it works.


Is there anything else I can do?

Many Thanks

James
-----Original Message-----
If what I said would stop it is there anyway I could get
my MSGBOX to work with my flashing Label?

Many Thanks

James

-----Original Message-----
I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James

It works for me.
Are you sure you don't have an invisible control hidden
where you are
clicking on the form. You must click on a blank space on
the form.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

A flashing label would not cause the code not to run.... as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click event?
(The Form click event is not the same as the Detail Click event.
If you are clicking in the Detail section, place the code in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and step through
line by line.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
F

fredg

James said:
I have done this and Still nothing??

I have made sure that everything works... the only thing
wrong is when I actually click the form it does nothing
when as you say it works for you...

James,
I have tried your code in AC2000 and AC2002. I verify that it does NOT work.

Perhaps Fred clicked on the body of his test form and invoked the property dialog without looking at
the header of the dialog. The dialog that comes up is for the Detail properties and indeed if you add an
onClick event to the Detail section, it works.
Is there anything else I can do?

Many Thanks

James
-----Original Message-----
On Fri, 19 Mar 2004 11:50:22 -0800, James wrote:

If what I said would stop it is there anyway I could get
my MSGBOX to work with my flashing Label?

Many Thanks

James

-----Original Message-----
I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James

It works for me.
Are you sure you don't have an invisible control hidden
where you are
clicking on the form. You must click on a blank space on
the form.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


A flashing label would not cause the code not to run.... as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click event?
(The Form click event is not the same as the Detail Click event.
If you are clicking in the Detail section, place the code in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and step through
line by line.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Hi Guys,
The Form Click event does work, but not if you click in the Detail
section.

If you have the code in the Form Click event, click in the area above
the navigation buttons but below the bottom of the record selector (in
other words under the detail section).
The Form Click event will then work.
However, if you wish to click in the Detail section, place the code in
the Detail Click event instead, or also.
 
J

James

Right thanks for that I thought that if I put it in the
Form Click then it would work wherever I clicked on the
form!!! Ah well now I know if I wish to click in the
Detail I need to put an On Click even in the detail
section of the form...

Many Thanks Gain Lads

James :)

-----Original Message-----
I have done this and Still nothing??

I have made sure that everything works... the only thing
wrong is when I actually click the form it does nothing
when as you say it works for you...

James,
I have tried your code in AC2000 and AC2002. I verify that it does NOT work.

Perhaps Fred clicked on the body of his test form and invoked the property dialog without looking at
the header of the dialog. The dialog that comes up is for the Detail properties and indeed if you add an
onClick event to the Detail section, it works.
Is there anything else I can do?

Many Thanks

James
-----Original Message-----
On Fri, 19 Mar 2004 11:50:22 -0800, James wrote:

If what I said would stop it is there anyway I could
get
my MSGBOX to work with my flashing Label?

Many Thanks

James

-----Original Message-----
I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James

It works for me.
Are you sure you don't have an invisible control hidden
where you are
clicking on the form. You must click on a blank space
on
the form.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


A flashing label would not cause the code not to run....
as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click
event?
(The Form click event is not the same as the Detail Click
event.
If you are clicking in the Detail section, place the code
in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and
step through
line by line.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Hi Guys,
The Form Click event does work, but not if you click in the Detail
section.

If you have the code in the Form Click event, click in the area above
the navigation buttons but below the bottom of the record selector (in
other words under the detail section).
The Form Click event will then work.
However, if you wish to click in the Detail section, place the code in
the Detail Click event instead, or also.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
J

James

Right thanks for that I thought that if I put it in the
Form Click then it would work wherever I clicked on the
form!!! Ah well now I know if I wish to click in the
Detail I need to put an On Click even in the detail
section of the form...

Many Thanks Again Lads

James :)

-----Original Message-----
I have done this and Still nothing??

I have made sure that everything works... the only thing
wrong is when I actually click the form it does nothing
when as you say it works for you...

James,
I have tried your code in AC2000 and AC2002. I verify that it does NOT work.

Perhaps Fred clicked on the body of his test form and invoked the property dialog without looking at
the header of the dialog. The dialog that comes up is for the Detail properties and indeed if you add an
onClick event to the Detail section, it works.
Is there anything else I can do?

Many Thanks

James
-----Original Message-----
On Fri, 19 Mar 2004 11:50:22 -0800, James wrote:

If what I said would stop it is there anyway I could
get
my MSGBOX to work with my flashing Label?

Many Thanks

James

-----Original Message-----
I have an onClick Event I have the following code:

Private Sub Form_Click()
Dim strMsg As String
strMsg = "Please Press a Key to Continue!"
MsgBox strMsg, vbOKOnly, "Error!"
DoCmd.Beep
End Sub

When I click the form it does nothing??

Any Suggestions?

Many Thanks

James

It works for me.
Are you sure you don't have an invisible control hidden
where you are
clicking on the form. You must click on a blank space
on
the form.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


A flashing label would not cause the code not to run....
as long as
you are not clicking on the label.

1) Did you write [Event Procedure] on the Form's Click
event?
(The Form click event is not the same as the Detail Click
event.
If you are clicking in the Detail section, place the code
in the
Detail click event, not the Form click event.)

2) Place a stop on the strMsg = line in the code and
step through
line by line.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Hi Guys,
The Form Click event does work, but not if you click in the Detail
section.

If you have the code in the Form Click event, click in the area above
the navigation buttons but below the bottom of the record selector (in
other words under the detail section).
The Form Click event will then work.
However, if you wish to click in the Detail section, place the code in
the Detail Click event instead, or also.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 

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