Solved

Common Controls

Posted on 1998-11-20
7
139 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 50 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now