Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access DB created with vba code/reference update?

Posted on 2004-08-03
8
Medium Priority
?
555 Views
Last Modified: 2010-10-20
Hi everyone I have made a Access DB and have several forms with vba code, I have made a MDE file but wanted to know because all the refereneces (word and excel) are linked to office 2003 applications will this database work with older office 2000 or xp applications? such as excel and word? and when the new microsoft applications will come out will these references still work - will they upgrade themselves? or would i have to go to the mdb file and do it myself?
0
Comment
Question by:eazy123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
8 Comments
 
LVL 34

Expert Comment

by:flavo
ID: 11701343
If you use early binding then no.

You'll need to use late binding. (its slower though)

You dont need refrences for this, so get rid of them

Example usage

Dim objExcel as object

Set objExcel = CreateObject("Excel.Application")

0
 
LVL 34

Accepted Solution

by:
flavo earned 500 total points
ID: 11701354
I had a similar Q today, heres one of my comments

Early v late binding:

Early binding
- Need to add a refrence (Tools - refrences)
- Faster
- Will fail if the exact refrence (dll) is not on the pc
- use like Dim xl as Excel.Application
             Set xl = New excel.application

Late Binding
- slower
- No refrences (tools - refences)
- Will work on for example Excel 97 if you develop on Excel 2000 (if same properties / methods were present)
- Use like - Dim xl as object
                set xl = createobjecy("excel.application")
0
 
LVL 34

Expert Comment

by:flavo
ID: 11701370
It is one of the problems from using early binding.  

I generally code everything up firstly with early binding so i get the IntelSense working, then once its all tested and debuged, change it to late binding just incase.

Dave
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:eazy123
ID: 11701383
how do i change it to late binding?
0
 
LVL 34

Expert Comment

by:flavo
ID: 11701459
Take away the refreces to Excel and word (leave Access)

Then replace anything that says

Dim xl as Excel.Appication

with

Dim xl as Object

and replace anything with

Set xl = New Excel.Application

with

Set xl = CreateObject("Excel.Application")

Dave
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 11703298
Actually, Access is USUALLY "intelligent" enough to update references ... for example, I use Excel 2000 on one dev computer, and most of my clients use 2002 ... if I make a reference to Excel 2000 on that laptop, build an .mde, and deploy it to their machine (with Excel 2002 installed), the .mde file will automatically re-reference to the  Excel 2002 library ...

However, you'll notice I said "usually" ... I'd not trust that in a distributed app, and would instead follow Dave's advice re" Late Binding (for more info, search on CreateObject in online help and Google) and check out Mitch Kaplan's site for the most comprehenisve look at this technique:

http://www.trigeminal.com/usenet/usenet026.asp

Terry Kreft's Ref Wizard:
http://www.mvps.org/access/modules/mdl0022.htm

The biggest concern in your environment is that you NOT use version-specific items (for example the Printer object in 2003, which is NOT available downstream) ... if you do this, your code WILL fail. Even if you develop in the 2003 environment with the default 2000 format, you can still use features of 2003 which may not be available downstream ...
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

715 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