473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Using an Excel VBA file as a front end to an Access Database

Hello!

I have written three "database" type programs in MS Excel that make Work Orders, Inventory, and Training information easy to use and automates much of the process. The upside to this is Excel VBA is easy to program in, the downside is only one person can use the sheet at a time.

What I would like to do is use Access as the datasource and maintain the excel files as the "front end" of the program. This should allow for multiple people to use the system at a time (rarely if ever would people be editing the same data at the same time, normally someone just leaves their copy running while they are away from their computer and it locks the file for everyone)

I have read/heard about using Access and Excel in this way, but I don't know how to start. I have made a few attempts but they all ended in miserable failure.

Can someone assist me in learning how to use an Excel VBA sheet as the front end to a database file? Thanks!
Oct 24 '13 #1
1 4746
zmbd
5,501 Expert Mod 4TB
IMHO: Don't do it.
Either make the jump to Access, or don't use Access. These hybrid integrations are difficult to maintain and break easily.

First thing I would do if I were you is take a look at the available templates in Office, from the MS Website, and from the various freeware templates on the net. More than likely you'll find one that works OTS or needs only a little modification to meet invoice numbering or what have you. If you can program VBA in Excel, you are well on your way to doing the same in Access. You might just need to learn a little bit: MS Access 2010 Tutorials will give you the basics. One thing to keep in mind:
Access - "Macro" is one of two languages not to be confussed with:
Access - "VBA" which is basically what Excel uses for "Macros"; however, with the tools/object model needed to work with recordsets.
IN Access the two terms are not interchangable!

And, we're here to help if you get stuck.

As for your current pickle:
In the short term take a look at this code. I've used variations of this in the past with good results for closing a file on idle time: Timed Closing Of A Workbook This will take care of your employee that leaves the file open. Figure out the average time it takes to do get the invoice etc... done. I wouldn't set the timer to less than 10 to 15 minutes of idle time as it's too easy to get caught in a phone call.

Next take a look at:Application Automation as you will need to understand how this works to get the best from what you want.
You will then need to understand how to connect to the database and use a query: Use Microsoft Query to retrieve external data (This is why, IMHO, you should just jump ship and move to an Access appliation (^-^) ).
You'll have to have a way to validate information between the frontends and the database or there WILL be issue with duplicated orders and other messes.

and that is just for starters. (0_0)

(yes, I tried this once... ouch... not one of my best moments)

Once you build your database, you'll split it so that there is a frontend and backend (not any different than what you're going to do with excel). Each user will have their own copy of the front end on thier local PC and the Backend will reside on the network.
Yu can then make changes to the frontend if needed and then distribute the new one in various manners... email, automated checks etc...

NO MATTER WHAT YOU DO... BACKUPS are a MUST!
NEVER edit the production copy of the frontend or backend, ALWAYS make a copy and edit it!
NEVER edit the backend during business hours if possible. If you must, then lock the users out, take the backend off-line... and even then, work on a copy of the file! This makes sure that your new backend is up to date with entries.
-z
Oct 24 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: rcb845 | last post by:
Hi everybody in the php community, I am relatively new in this field, and one of my first challenge is the following : Importing an Excel file, containings URL, into a MySQL database. It...
0
by: Dodong | last post by:
Hi, i am a new vb6 programmer. I would like to know the vb6 code to read excel file and save it to access database. I am using ADO.
1
by: mitucse | last post by:
Hi I am in touble to connect my html file with access database. please reply me if anybody can send me the connection code. thank you
2
by: shireen Eason | last post by:
How to create a text output file from access database?
0
by: satenova | last post by:
Hello Friends, I am newbie when it comes to vb.net and i need to import excel sheet into access db using vb.net application. Here is the code i use for now to upload excel sheet and it works...
2
by: jitendrawel | last post by:
how can be import excel file in mysql database through PHP code. Please send me complete code ASAP. Thanks. Best regards, Jitendra Kumar
5
by: sumanta123 | last post by:
Dear Sir, How to export/import the excel file in oracle database using sql promt. Please guide me the command(export/import) for the neddful. Thanks in Adavance. Regards Sumanta Panda
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
2
by: Lynch225 | last post by:
Hey all, I am having issues when trying to open an Excel file from Access VBA. Here's the code I have so far: Public Sub Prod() Dim xlApp As Object Dim xlWorkbook As Object Dim strProd As...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.