2007 - 2010 code issue

jcaptchaos2

Well-known Member
Joined
Sep 24, 2002
Messages
1,032
Office Version
  1. 365
Platform
  1. Windows
I know there is issues with creating access databases in 2010 and then not being able to open them with 2007 but wanted to know if there is a way to not my code stop at the debugger on this part of the code when running it on a machine with 2007. I tried installing access runtime 2010 on the pc with office 2007 but the code still stops here. It runs fine with any machine that has 2010.
Code:
Set MyDatabase = DBEngine.OpenDatabase _
("N:\Fishbowl Databases\Time Clock Min.accdb")
Set MyQueryDef = MyDatabase.QueryDefs("Payroll Time Detail by Dept-Shift")
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
JC,
Not sure I fully understand your requirements.
wanted to know if there is a way to not my code stop at the debugger on this part of the code when running it on a machine with 2007

But you can test what version of the software is running using Application.Version and handle for each case

Code:
    If Val(Application.Version) < 12 Then
        MsgBox "Running version earlier than 2007"
    ElseIf Val(Application.Version) = 12 Then
        MsgBox "Running 2007"
    ElseIf Val(Application.Version) = 14 Then
        MsgBox "Running 2010"
    End If
 
Upvote 0
Rob,
Thanks fo in.r replying, I think it may be just a security issue on our server, I will check when I get in tomorrow as when I tried to run the macro on another pc with 2007 it was with another user log
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top