-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Perhaps this (untested):
Sub SetEvent(strEvent as string, strFunction as string)
' In:
' strEvent The event name you want to change
' strFunction The name of the function you want
' to set the event to.
dim frm as form
dim dbs as Object
set dbs = Application.CurrentProject
for each frm in dbs.AllForms
docmd.openform frm.name, acDesign
frm.Properties(strFunction) = strEvent
docmd.close acForm, frm.name, acSaveYes
next frm
End Sub
You'll probably want to put in error handling and/or exclusion criteria
so you don't change a form that you don't want to change.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQX6kWIechKqOuFEgEQKw0ACfeHW8IOLL+t9JSFn+blrF6M 4Rx7EAn3ni
TSUz5dNKgSxRIGtpQCNXZsYI
=VDMZ
-----END PGP SIGNATURE-----
Farooq wrote:
Thanks to all who reply
OS: NT 4
Office: XP
Is there anyway I can type a Function name on a workevent of a form
(automatically)
Problem: If I have 50 Forms in a db and each of them now requries a
Function call at a certain Work Event. It's not a good idea of opening
50 forms and typing my function call at that work event. Are there any
wizards or Add-In or some code that I can write to avoid opening 50
forms and placing a function on the work Event