Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Common Controls

Posted on 1998-11-20
7
Medium Priority
?
149 Views
Last Modified: 2010-05-18
I have my own image controls such as close, move next, prev, last etc i use them in most of my forms, how can i use a module to keep them all an use them with every module seperately. I am not strong in general modules programming, so please make it as simple as my brain can take.

thanks
0
Comment
Question by:abidsml
7 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1445833
The best solution is creating an OCX, add all your code in that OCX. See in the help file to see how to create OCX.

If you explain a little more, I could help you
0
 

Author Comment

by:abidsml
ID: 1445834
Thanks, I never worked with OCX, but what i need is to make a single code for my navigation buttons ie, next, find, exit, last filter etc and use it in every form i create.
0
 

Accepted Solution

by:
EnterSandman earned 100 total points
ID: 1445835
There is no simple way to do that without creating an OCX control. If you still need to create specific code for each form, you can allwais provide the interface in your OCX to do that.
Know the big isue here is that I think, by your reply that you are not very familiar with Classes and Object development. Think again. If you develop software without classes and objects, you may say you are still developing in Visual Basic 3.0. So my advice is you to get some info on this, and learn as mutch as you can, because beleave me, they are like Mobile phones.... you dont need them until you have one. Then you cant live without them.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:abidsml
ID: 1445836
i want to mention that my progs & forms are in VBA Access 97 , is the same as VB5.
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1445837
A quick comment.... Although a OCX is the best solution... a easier option might be to create a module with the appropriate subs for the controls in it ... and reuse the module.........


0
 

Author Comment

by:abidsml
ID: 1445838
Ok Mavrick, so how can i refer to the controls , command buttons from each form to the module, can i keep the name of the control consistant then ie. cmdNext, cmdPrev
thank you
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1445839
I'll try and give you a exampe APP for it....

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question