A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Event procedure



 
 
Thread Tools Display Modes
  #1  
Old April 2nd, 2008, 09:49 AM posted to microsoft.public.access.tablesdbdesign
binny
external usenet poster
 
Posts: 20
Default Event procedure

Please tell me if I can use the [event procedure] more than once in a form.
If I change the name. It doesn't work. If I don't change the name. The
[event procedure] just moves to from one combo box to the next. Is there
some way to save a procedure and rename it.
--
binny
  #2  
Old April 2nd, 2008, 10:17 AM posted to microsoft.public.access.tablesdbdesign
Brendan Reynolds
external usenet poster
 
Posts: 1,241
Default Event procedure

"binny" wrote in message
...
Please tell me if I can use the [event procedure] more than once in a
form.
If I change the name. It doesn't work. If I don't change the name. The
[event procedure] just moves to from one combo box to the next. Is there
some way to save a procedure and rename it.
--
binny



Maybe you mean something like this ...

Option Compare Database
Option Explicit

Private Sub SomeProcContainingCommonCode()

MsgBox "Common code goes here"

End Sub

Private Sub Form_Close()

SomeProcContainingCommonCode

End Sub

Private Sub Form_Open(Cancel As Integer)

SomeProcContainingCommonCode

End Sub

--
Brendan Reynolds

  #3  
Old April 2nd, 2008, 11:26 PM posted to microsoft.public.access.tablesdbdesign
binny
external usenet poster
 
Posts: 20
Default Event procedure

OOOO.KKKKK
So it looks like my next move is back to my online Uni to take a course
on VBA
Thanks anyway
--
binny


"Brendan Reynolds" wrote:

"binny" wrote in message
...
Please tell me if I can use the [event procedure] more than once in a
form.
If I change the name. It doesn't work. If I don't change the name. The
[event procedure] just moves to from one combo box to the next. Is there
some way to save a procedure and rename it.
--
binny



Maybe you mean something like this ...

Option Compare Database
Option Explicit

Private Sub SomeProcContainingCommonCode()

MsgBox "Common code goes here"

End Sub

Private Sub Form_Close()

SomeProcContainingCommonCode

End Sub

Private Sub Form_Open(Cancel As Integer)

SomeProcContainingCommonCode

End Sub

--
Brendan Reynolds

  #4  
Old April 7th, 2008, 12:01 PM posted to microsoft.public.access.tablesdbdesign
Evi
external usenet poster
 
Posts: 898
Default Event procedure

What are you trying to do with the Event Procedure? Remember that you can
not only have Event Procedures in forms, you can also have them individual
controls in the form.
You can also have Subs and Functions in Modules.
I don't know what you mean 'If I change the name' - remember, none of us can
see what you are doing and I for one, don't have a good enough memory or the
time or inclination to hunt through all your previous posts to see what you
wanted to do there. You say 'is there some way to save a procedure and
rename it'. Much more clarity is needed.

Evi

"binny" wrote in message
...
Please tell me if I can use the [event procedure] more than once in a

form.
If I change the name. It doesn't work. If I don't change the name. The
[event procedure] just moves to from one combo box to the next. Is there
some way to save a procedure and rename it.
--
binny



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.