VBA Problem

  • Thread starter Thread starter roblost
  • Start date Start date
R

roblost

I do not understand I am new to 07 and a wondering if they have changed the
way things work?

I am trying to get a simple message box to come up after pressing a button
on a form.

I have used the onclick action to set a procedure as follows

Private Sub Command4_Click()
MsgBox ("test")

End Sub

Why does nothing happen?
 
I tried everything you said and it still does not work. I am not new at this
it just seems like it does not even now I have code there.

I made sure that the onclick had the procedure set and my code looks like
this now.

Private Sub Command4_Click()
Call MsgBox("test")

End Sub

Any other ideas? Thanks for the response this has me stumped maybe I need
to reinstall it or something.

I cannot get any code even the simplest things to work. I assume they have
not changed it from xp that much that I need to relearn the vb language.

Alex Dybenko said:
Hi,
try
MsgBox "test"

or

call MsgBox ("test")

also check that in comman4 OnClick property [Event procedure] is set

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

roblost said:
I do not understand I am new to 07 and a wondering if they have changed the
way things work?

I am trying to get a simple message box to come up after pressing a button
on a form.

I have used the onclick action to set a procedure as follows

Private Sub Command4_Click()
MsgBox ("test")

End Sub

Why does nothing happen?
 
Hi,
Look - perhaps you have a security warning, then make sure you add trusted
location.
Try to run sample northwind dabase, if it does not work either - then I
suggest to reinstall access.

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

roblost said:
I tried everything you said and it still does not work. I am not new at
this
it just seems like it does not even now I have code there.

I made sure that the onclick had the procedure set and my code looks like
this now.

Private Sub Command4_Click()
Call MsgBox("test")

End Sub

Any other ideas? Thanks for the response this has me stumped maybe I need
to reinstall it or something.

I cannot get any code even the simplest things to work. I assume they
have
not changed it from xp that much that I need to relearn the vb language.

Alex Dybenko said:
Hi,
try
MsgBox "test"

or

call MsgBox ("test")

also check that in comman4 OnClick property [Event procedure] is set

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

roblost said:
I do not understand I am new to 07 and a wondering if they have changed
the
way things work?

I am trying to get a simple message box to come up after pressing a
button
on a form.

I have used the onclick action to set a procedure as follows

Private Sub Command4_Click()
MsgBox ("test")

End Sub

Why does nothing happen?
 
Ok I found out what the problem was. I had to put the database in a trusted
folder. Without, it would not run because of the dumb over protective
security they have for access 07.

Alex Dybenko said:
Hi,
Look - perhaps you have a security warning, then make sure you add trusted
location.
Try to run sample northwind dabase, if it does not work either - then I
suggest to reinstall access.

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

roblost said:
I tried everything you said and it still does not work. I am not new at
this
it just seems like it does not even now I have code there.

I made sure that the onclick had the procedure set and my code looks like
this now.

Private Sub Command4_Click()
Call MsgBox("test")

End Sub

Any other ideas? Thanks for the response this has me stumped maybe I need
to reinstall it or something.

I cannot get any code even the simplest things to work. I assume they
have
not changed it from xp that much that I need to relearn the vb language.

Alex Dybenko said:
Hi,
try
MsgBox "test"

or

call MsgBox ("test")

also check that in comman4 OnClick property [Event procedure] is set

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

I do not understand I am new to 07 and a wondering if they have changed
the
way things work?

I am trying to get a simple message box to come up after pressing a
button
on a form.

I have used the onclick action to set a procedure as follows

Private Sub Command4_Click()
MsgBox ("test")

End Sub

Why does nothing happen?
 
Back
Top