Simple Sub Procedure for Form operations

dungstar

Registered User.
Local time
Today, 03:08
Joined
Mar 13, 2002
Messages
72
Okay, this should be simple, but I don't have much experience using class modules. I tried browsing around for an answer, but I think my level of expertise (or lack thereof) on this matter would make it as easy to find here as the needle in the haystack.

I have several different forms that must synchronize a pseudo-array of checkboxes with a listbox. (I.e. checkbox2 corresponds to row 2 of the listbox, etc.) I need to right a common procedure that does this for all the forms containing these objects. I have coded an AfterUpdate event for one of the combo boxes that triggers this synchronization.

What I tried doing (which is obviously wrong) is creating a module and cutting and pasting the code from the cbo afterupdate event. This gives me an "Invalid Outside Procedure" error when I try calling the module.

Pretty much what I am attempting to do is call the procedure as literally into the form module's cbo afterupdate event.

In the code I have variables defined and manipulated, and form object properties manipulated like: Me!lstPosition = ""

Life will be much easier if I learn how to do this properly... Thank you so much for ur help!
 
What line is giving you the "Invalid Outside Proceedure" Problem that you mentioned?

It sounds as if a public proceedure held in a module would work for you but that it needs to be tailored a bit to make it work appropriately.

More information on the code itself would be helpful.
 
What I'm trying to do is to essentially run an AfterUpdate event from a combobox for "cboBox".

This time what I've tried is to do is create the Public Sub in a module. It says "Me" invalid keyword. How do I use a String Variable as in assigning values to a control?

I thought this would be better placed in a different topic. I called the subject "Using Strings variable to call form controls". Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom