[AccessD] Syntax problem in Access 2000

Liz Doering liz at symphonyinfo.com
Wed Sep 24 10:29:46 CDT 2003


Hej på dig, Goran!

One form can't see the code associated with another form.

If you move the code you want to run to a public module, you will be able to
call it from anywhere in your application.

So instead of

Private Sub cmdUpdate_Click()
'do some stuff here
End Sub

You'll have in a module

Public Sub UpdateRoutine()
'do your same stuff here
End Sub

and, on form X

Private Sub cmdUpdate_Click()
Call UpdateRoutine
End Sub

and, on form Y

Private Sub Form_Close()
Call UpdateRoutine
End Sub

Hope this helps,

Liz Doering
Symphony Information Services
liz at symphonyinfo.com
www.symphonyinfo.com




-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Pajnic, Goran
Sent: Wednesday, September 24, 2003 8:02 AM
To: 'accessd at databaseadvisors.com'
Subject: [AccessD] Syntax problem in Access 2000



Hi group!

Greetings from Sweden!

Syntax problem in Access 2000:

I have a forms called x and y.
The form X is open and the form Y is open too. On the form X I have a button
called "cmdUpdate" and some code in On click property for this button -
cmdUpdate_Click(), in other words. When I close Y (On Close) I will run
cmdUpdate_Click().

 I can't get this work...some suggestions?

Thanks

Goran Pajnic
Skanska IT Solutions AB
205 33 MALMÖ
Sweden
e-mail: goran.pajnic at skanska.se
 <http://www.itsolutions.skanska.com/> http://www.itsolutions.skanska.com


"This message has been written in 100% recycled electrons"


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list