pem406
New member
- Local time
- Today, 23:42
- Joined
- Oct 1, 2009
- Messages
- 5
I have a simple sales pipeline tool written in Access 2007. Most people are using the Access 2007 runtime as they don't have a full Access 2007 licence.
Some users need to import data from other users and to do this, I added the following code (not my own as I am not a VB expert!) to open a file dialog box so that they can select the relevant file.
This has worked fine on Windows XP but one user has Windows 7 and whenever he tries to run this code, he keeps getting an errror.
he's using the 32-bit version.
I've already deployed the tool across several companies so I don't want to change the database if I can help it. Is there anything I can do on his machine that could help? Is he perhaps using a Beta version of Window 7?
Any ideas???
Set ObjFSO = CreateObject("UserAccounts.CommonDialog")
'Sets Type of file to look for
ObjFSO.Filter = "VBScripts|*.vbs|Text Documents|*.txt|All Files|*.*"
ObjFSO.FilterIndex = 3
'Sets Directory for initial search to start in
ObjFSO.InitialDir = "C:\Your Location"
InitFSO = ObjFSO.ShowOpen
'Transfers file using acImportDelim profile previously set through manually importing into table
DoCmd.TransferText acImportHTML, ("QryEnquiriesExport Import Specification"), ("tblUserEnquiriesImport"), ObjFSO.filename
Some users need to import data from other users and to do this, I added the following code (not my own as I am not a VB expert!) to open a file dialog box so that they can select the relevant file.
This has worked fine on Windows XP but one user has Windows 7 and whenever he tries to run this code, he keeps getting an errror.
he's using the 32-bit version.
I've already deployed the tool across several companies so I don't want to change the database if I can help it. Is there anything I can do on his machine that could help? Is he perhaps using a Beta version of Window 7?
Any ideas???
Set ObjFSO = CreateObject("UserAccounts.CommonDialog")
'Sets Type of file to look for
ObjFSO.Filter = "VBScripts|*.vbs|Text Documents|*.txt|All Files|*.*"
ObjFSO.FilterIndex = 3
'Sets Directory for initial search to start in
ObjFSO.InitialDir = "C:\Your Location"
InitFSO = ObjFSO.ShowOpen
'Transfers file using acImportDelim profile previously set through manually importing into table
DoCmd.TransferText acImportHTML, ("QryEnquiriesExport Import Specification"), ("tblUserEnquiriesImport"), ObjFSO.filename