By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Custom Events / Application properties ?

P: n/a
Hi,

I have a function that needs to run whenever a user clicks on any
textbox, listbox or combobox on any input forms in my application
(there are many forms).

Background (in case someone has a better suggestion):
The forms are all unbound and the datatype and inputmasks are built on
the fly.
If the user clicks on the control, the cursor is positioned at the end
of the inputmask. They find this bothersome and wish the cursor to be
positioned at the beginning. Fine, no problem for that part. I create
a function that sets SelStart = 0 for the control clicked on.

Hopeful question:
Is there any way to call this function without putting a line of code
on the click event of every control on all of these forms? Maybe using
a class module to create a customized application level event? Can you
create application events? Can you create custom properties for
controls - like "StartPosition" for example and then set that property
upon opening the application?

Thanks for your input,
April
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
April,

Open your form im design view. Hold down the Shift Key and use the lasso and
also individual picks until you have selected all the controls you want to
execute the function. Open properties to the Events tab. Type the following in
the OnEnter event:

=NameOfYourFunction

All the controls you selected on your form will now execute your function. You
can do the same thing to other forms.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"April" <Pr*************@hushmail.com> wrote in message
news:54**************************@posting.google.c om...
Hi,

I have a function that needs to run whenever a user clicks on any
textbox, listbox or combobox on any input forms in my application
(there are many forms).

Background (in case someone has a better suggestion):
The forms are all unbound and the datatype and inputmasks are built on
the fly.
If the user clicks on the control, the cursor is positioned at the end
of the inputmask. They find this bothersome and wish the cursor to be
positioned at the beginning. Fine, no problem for that part. I create
a function that sets SelStart = 0 for the control clicked on.

Hopeful question:
Is there any way to call this function without putting a line of code
on the click event of every control on all of these forms? Maybe using
a class module to create a customized application level event? Can you
create application events? Can you create custom properties for
controls - like "StartPosition" for example and then set that property
upon opening the application?

Thanks for your input,
April

Nov 13 '05 #2

P: n/a

"April" <Pr*************@hushmail.com> wrote in message
news:54**************************@posting.google.c om...
The forms are all unbound and the datatype and inputmasks are built on
the fly.

What are you, a Martian?
Nov 13 '05 #3

P: n/a
On Tue, 06 Jul 2004 16:40:22 GMT, "PC Datasheet" <no****@nospam.spam> wrote:
=NameOfYourFunction


=NameOfYourFunction()
Wayne Gillespie
Gosford NSW Australia
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.