MS Access 2007 Import Not Working? - ms-access

I just switched from Access 2003 to Access 2007. In the very first "dev" copy (as I call it) pre-split, pre-front end, I need to import some data that are text files. I try to use the ribbon to do this, and after I walk through the steps I get this little pop up box that states
Microsoft Access has determined this to be a potential security risk. You shouldn't accept....
Then I Click OK to accept (open the file)... and nothing happens...no import, no file.
So I tried making a new table on import, creating a table in access then importing, coverting the data file to xls & web before importing, using a completely different data file. Nothing seems to change the outcome of Access not firing off some type of import event (which I think is supposed to be a wizard or something??)
So does anyone have any ideas what is going on with this?
I would just code the data import but I don't know how (without using the wizard to at least create the specification).

Is the folder where the database resides configured as a Trusted Location? I know VBA code won't run if it's not. I wasn't aware those types of restrictions extended to file import from the Ribbon. However, your error message sounds similar to a Trusted Location issue, so it may be worth checking.
See Create, remove, or change a trusted location for your files for detailed instructions on managing Trusted Locations.

Access was formerly very fussy about extensions and would stop working if, for example, a text file did not have an expected extension. It used to be necessary to modify the registry to get around this. It seems that the problem may still exist.

Related

How do I amend shared data source definitions after SSRS migration to a diff node?

Do not seem to be able to find any place in the portal or Report Builder where I can actually edit the connect string & creds.
Report Manager shows the XML, but that really is it.
Disk files (from the looks of it) are no longer present in high versions (using SQL 2016/2017).
Is there a known location anywhere in GUI, or maybe direct edits in the SQL Server repository?
I can't even delete a shared source anymore, only view or test the connection.
If anybody could post a screenshot, it'll be highly appreciated.
EDIT: Just found out - when I create a new Data Source, it's editable; the imported data sources are not.
There are two ways of doing this. You can set the 'overwrite datasource' option in the project properties.
Or, you can got to the report portal , show hidden items in the view menu and there is a folder called "data sources". Open this and you will see all data sources, from there you can edit and save changes. All reports that use that datasource will be affected.

OpenFile Dialog MS Access 2010

I followed the suggestion by Cody Gray about halfway down the page in this thread but I'm having no luck.
Unless I'm missing something, this is supposed to allow me to navigate from Access, using the Windows API Dialog Box, to the relevant folder and open a file, no? I'm trying to open a Word doc which has a Mail Merge coming back to the same Access Db. I needed the dialog because there are multiple files that may be selected at different times.
I added all the suggested code and while the process runs without error, when I get to the final step, the selected file doesn't open. Nothing happens.
I realize this is not much help without an error message. Any thoughts nonetheless?
As I understand the situation, you have code which uses a string variable named strFileToOpen to hold the path to a Ms Word document. And now you want to open that file in Word.
You can use the FollowHyperlink method.
Application.FollowHyperlink strFileToOpen
Look at the Access help topic for that method. It offers other options you may wish to use.
Also I suggest you look at the help topic for FileDialog Object. It is simpler than the Windows APi method in the code you linked.

Can I add some public meta data to an encrypted Access 2010 database?

My application stores its data in an Access 2010 database (accdb) file. It's password protected, which means it's encrypted w/ AES-128.
I'd like to add some meta data to the file that's publically available. This way older verisons of my application can investigate the file to see if it's even worth trying to open. Otherwise, they'll just get the dreaded "Unrecognized Database Format" error, which is usually associated with file corruptions.
In Windows, you can right-click on a file, click "Properties" and see attributes under the Details tab. I'd love it if I add attributes like the version of my application that last touched the file, and maybe other details. I'd like to avoid having a different file extension for each version of my app!
Is it possible to add some public meta data to an encrypted Access 2010 database?
You can add custom database properties : http://support.microsoft.com/default.aspx?scid=kb;en-us;q178745
You can change the file extension of an encrypted Access database and change the properties for that extension. The extension .enc is fairly descriptive and does not seem to be widely used.
The file will open normally when clicked and ask for the password. The icon will be recognizably Access and the description, "Encrypted MS Access" in this case, will appear under Type in a directory listing.
With NTFS, you can add an alternate data stream (ADS):
notepad.exe z:\docs\testde.enc:Extra.txt
Reading the stream:
more < testde.enc:extra.txt
More information: http://www.think-techie.com/2010/04/alternate-data-streams.html
http://www.irongeek.com/i.php?page=security/altds
This is a tough nut to crack! An application must read information about the ACCDB, but that information can't be stored in the ACCDB because you want the read without opening the ACCDB. And you can't use the suggested file system methods because this must work under Wine on Mac (I assume from another of your questions).
The only solution I can see is to create a companion file (with same base name but different extension) to hold the metadata. So if your application wants to know about SomeDb.accdb, it would look for a file named SomeDb.metadata and read that instead.
I suggested a kludge for your earlier question ... unfortunately this is another. :-) However, it's a simple kludge and it should work ... even on Mac.

MS Access - Open database form from URL

I'm trying to open a form from an url. This ms access database will be hosted on a shared folder in an network, and the costumer has asked me if it's possible to open an database form (i'll have to pass an ID).
If this were in web environment i would do this without any problem, but honestly in ms access i have no idea how to do this.
Can someone help me?
Have a look at Register protocol and Registering an Application to a URL Protocol. They have a example registry file on how to register a protocol:
REGEDIT4
[HKEY_CLASSES_ROOT\foo]
#="URL:foo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell]
[HKEY_CLASSES_ROOT\foo\shell\open]
[HKEY_CLASSES_ROOT\foo\shell\open\command]
#="\"C:\\Program Files\\Application\\program.exe\" \"%1\""
You can change the last line to something like:
#="\"C:\\Program Files\\Office\\access.exe\" \"C:\\path\\to\\your\\db.mdb\" /cmd \"%1\""
If you URL is foo:241245, the following command is called:
"C:\Program Files\Office\access.exe" "C:\path\to\your\db.mdb" /cmd "241245"
In Access, the commandline arguments are returned by the Command function:
In the direct window:
?Command
241245
The database can be opened from a URL like any other file:
file://server/share/path/database.mdb
This won't work if the database has user-level security on it though. I've only ever done that by using a windows shortcut.
If you're not using user-level security and the URL works, you can set the desired form to open automatically on load by going to the Access Options screen and the Current Database tab, then selecting the desired form from the Display Form drop-down list.
Oops - I just noticed that you said you'd need to pass an ID. I don't know if that's possible using a URL.
Open your Access database from the network location (i.e., with a UNC path, not from a drive letter, or locally).
Navigate so you can see the form listed in your database.
Drag the form to your desktop. A shortcut directly to the form will be created there.
I don't think this is a good idea, though. It's a substitute for a user interface in your Access application. Additionally, your description of the problem sounds like you're intending to have multiple people opening the same database file. This is a really bad practice -- best practice is for the database to be split (back end with data tables only on the server, and individual copy of the front end with forms/reports/etc. on each user's workstation), and more than one user should never be opening the same front end at the same time.

Problem importing binary registry key into Windows

I exported a binary (REG_BINARY) registry value from my computer (IE setting). I need to re-import this into another computer (both Windows 7). When I try to import the registry file (same one that I exported), I get this error: "Cannot import file.reg. Not all data was successfully written to the registry. Some keys are open by the system or other processes." I've tried importing in safe mode with to no avail. After some general research, it seems I need to import binary data a special way, but I can't seem to make it work. This is the registry key:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\User Preferences]
"88D7D0879DAB32E14DE5B3A805A34F98AFF34F5977"=hex:01,00,00,00,d0,8c,9d,df,01,15,\
d1,11,8c,7a,00,c0,4f,c2,97,eb,01,00,00,00,35,9a,4f,4f,a4,58,47,4b,b0,5d,78,\
59,a6,1d,01,df,00,00,00,00,02,00,00,00,00,00,03,66,00,00,c0,00,00,00,10,00,\
00,00,60,cf,a0,df,fc,ef,bc,e4,f4,71,a7,e8,ad,4c,3b,5f,00,00,00,00,04,80,00,\
00,a0,00,00,00,10,00,00,00,80,30,65,dd,2e,3e,2e,45,c0,5b,09,8f,3e,f2,88,79,\
50,00,00,00,24,c2,46,26,e7,85,28,9a,fd,e0,5f,78,ba,7d,04,c8,34,47,5c,ef,64,\
bb,7a,be,f8,c4,dd,88,b5,b1,39,c1,19,9b,81,a3,92,ab,7a,70,8f,dd,19,0c,7f,af,\
66,7d,66,e5,e9,16,6c,20,2b,fa,4a,dd,2b,24,de,df,0a,b2,83,84,29,a7,37,8e,33,\
b7,56,53,f5,a0,34,0b,8c,42
Any ideas how I can import this into another computer? Thanks!
Spent some time to sort out this key. It is only accessed when manipulating the search providers in IE. These changes appear to be done under a very protected code path that controls access to this key. This seems reasonable as the search provider is an attack vector that has been exploited by malware/spyware/adware. I am pretty sure you will not be able to manipulate this key directly without running into issues.
Jason