Using C++ Code in an Access Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am a teacher and coach who knows a little VBA in Access. The school board (under a comment by a professor at our local university) wants me to re-write a form in C++. The form has a lot of VBA code and uses SQL. They want me for some reason to re-write it in C++ so they can give it to a Junior College

Before I go through the time and expense can this be done and if it can, how to you compile the C++ code?

Thank You in Advance for Your Assistanc

Tony
 
The answer to your question "can it be done" is OF COURSE, just not in
Access. To duplicate an Access form in C++ it would have to be completely
rewritten using a tool that can create C++ windows applications. Microsoft
Visual Studio has a Visual C++ tool that could be used to do this. Hope you
have lots of spare time to make this happen. ;-)

Ron W
Tony Zamora said:
I am a teacher and coach who knows a little VBA in Access. The school
board (under a comment by a professor at our local university) wants me to
re-write a form in C++. The form has a lot of VBA code and uses SQL. They
want me for some reason to re-write it in C++ so they can give it to a
Junior College.
Before I go through the time and expense can this be done and if it can,
how to you compile the C++ code?
 
Tony said:
I am a teacher and coach who knows a little VBA in Access. The school board (under a comment by a professor at our local university) wants me to re-write a form in C++. The form has a lot of VBA code and uses SQL. They want me for some reason to re-write it in C++ so they can give it to a Junior College.

Before I go through the time and expense can this be done and if it can, how to you compile the C++ code?


No, this can not be done in Access. You would have to find
a way to hook the Access form to the C++ code (in a DLL?)
and the end result will be far more difficult to maintain,
not to mention the difficulty of creating this arrangement
in the first place. IMO, it would be cleaner to recreate
the entire application in C++ than to create that kind of
mutant hybrid, but, since C++ is not a data centric
language, it would be a lot more work than it took to create
it in Access.

I would tell this naive professor to take a hike, the Junior
College folks would have a lot less trouble with your code
as is than they would with the mess he's asking for.
 
I am note quite clear what you are trying to do here?

a) Take a access form, and re-design, and re-write the form using the tools
in c++

b) Keep the access form, but move out the code in the form to c++, and then
have the form call this code?

In the first case, you will NOT need ms-access installed on the target pc,
in the 2nd case, you could move out some of the code functions in your form,
and re-write them using c++. Your form then could call these c routines.

I have little, or no idea as to why you would want to do this (there will in
most cases be NO increase in performance). Unless some really number crunch
type of calculates must be done.

Your request seems a little strange..and perhaps you, (or us) are not
understanding what you are trying to accomplish.

Is it possible you, or us missing understand what you are trying to do here?

Please do feel free to expand on what your goal here is...

Perhaps,the desire/goal here is to create a product that can be distributed
to a bunch of people, and those people/users do NOT want to purchase
ms-access to use the application.

In this case, I would use VB, or even consider using the developers edition
of ms-access which lets you package your installs.

Anyway...the request without additional information does not make 100%
sense. I am guessing that some miss-communication has occurred along the way
somewhere here...
 
Back
Top