Set default Zoom Window font size in Access 2016 query designer? - ms-access

Does anyone know if there's a way to set the default font size for the Access 2016 Query Zoom window?
I often use the Zoom window when editing lengthy/complex expressions. I can set the zoom window font size but it only "sticks" for the current session. Next time I start Access, it's back to Tahoma 8pt.
I have no issue with the "Query Design Font" (File → Options → Object Designers → Query Design Font) as it [properly] stays where I set it (Sergoe UI 11) between sessions, but the Zoom window seems to insist upon a smaller font than the query designer.
Maybe I'm missing something but I couldn't find anything applicable online, nor in/around registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Access
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Access
It's a minor issue but years of frustration with it is starting to add up! Surely there's a setting somewhere so I don't have to change it every time I use Access... Any ideas? Thanks!
[I'm running Access 2016 (local install Version 1711 via Office 365 ProPlus subscription) on Windows 7 Home Premium SP1 64-bit.]

The Zoom box is part of (Office installation path)\ACCWIZ\UTILITY.ACCDA. You can open this file and see the form ZoomForm, but you can't edit it.
Note that the Zoom box is not restricted (or specific) to the query designer - you can use Shift+F2 wherever you can edit (or see) a value.
With help from https://access-programmers.co.uk/forums/showthread.php?t=238660 and https://bytes.com/topic/access/answers/739912-change-default-font-zoom-box :
Set a reference to UTILITY.ACCDA.
In your startup code (called from an AutoExec macro), call this function:
Public Function ZoomBoxSetParams()
' adapt to your preferences
utility.zoom_stFontName = "Consolas"
utility.zoom_iFontSize = 16
End Function
It is not necessary to overwrite the Shift+F2 action with an AutoKeys macro as proposed in the linked threads. You only need to set these variables, and the Zoom box will always use this font.
Note:
This is mainly useful for your development computer. If any of your users use a different version of Access, or the runtime version, the reference to UTILITY.ACCDA will break.
If you are in this situation, you will either have to remove the reference and code before distribution, or perhaps set the reference at runtime if UTILITY.ACCDA is available.
Edit:
An alternative Zoom box is here: http://www.accessmvp.com/TomVanStiphout/ZoomBox.htm
(I haven't tried it)

Related

Microsoft Access 2013 - Windows 10 - PopUp Window disappears

we are using Microsfot Access 2013 on Windows 10 system and when we open the application to run a query which outputs data to a table, the button which creates the popup form / window to enter the date range somehow just disappears.
Other systems using the same tool do not have this problem, and the tool was working just fine yesterday.
Any one have an ideas?
If the database was used on a multi-monitor setup it's possible the forms position has been stored "off screen".
Open the pop up in design view (It should appear!), and set AutoCentre property to true, and resave the pop up. It then should always appear in the middle of the current screen.

Show Windows File Copy Progress Bar in Access-VBA (2016)

Copying many files from several sources to several destination over our network using MS Access 2016. Can use SysCmd to show Progress Bar on status Bar. Can also show file copy counter as a msg on status bar via Application.Echo True, "msg". But neither is as informative or visually appealing as that used by Windows file copy progress bar. Have looked at several customized progress bars on forms. If I could develop each to show the same information and progress bar as the one used by Windows, it'd be fine. But I wonder if there's a way to call the one used in Windows from MS Access VBA. Thank you in advance.
As far as I know, the only way to achieve this is to create a custom COM library. Because the explanation is rather long, I will refer you to some resources (you will need some version of Visual Studio to create the library, and some experience with either C# or VB.Net).
You will want to call FileSystem.CopyFile in your library, with ShowUI set to AllDialogs (https://msdn.microsoft.com/en-us/library/ms127965(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb).
See http://www.geeksengine.com/article/create-dll.html for instructions how to create the library, and register it in Access.

Access - change DB icon

Is there any way to change a desktop icon for only one Access DB ? And not using shorcut for icons ?...I've found some examples for doing this, but nothing seems to work for me.
Any help much appreciated !
not sure if this is what you're looking for but in Office 2010 for example Go to
Access Options & Click Current Database. Under Application Options, in the Application Icon box, you can either type in the full Path of the icon that you want or browse to the file location.
https://support.office.com/en-us/article/Add-a-custom-title-or-icon-to-a-database-0e43e135-dd0d-4451-84ea-4f547e14480e
I dont know why answer was deleted, but once again - you can't change Access DB icon for only 1 file, except using shortcuts method - which is not same.
I am pretty sure that you can do this using the package and distribute wizard. You can then distribute the database as an executable file, I think (not 100%). this would show without the shortcut arrow on the desktop.
File> save and publish> package solution
You may first have to go to options> add-ins > manage com add-ins and enable the package solution add-in.

Is it possible to change an .accde file icon to a custom image?

I am trying to make my Access (2013) application look less like Access and more like a "real" piece of software. One of the things I am trying to accomplish is changing the icon from the normal A/grid/lock to an image of my choosing.
Is this possible? If not really, what is my next best option?
Thanks!
You can change the icon that Access shows when running your database, it's under Options -> Current database.
You cannot change the icon that Explorer shows for your .accde file.
Of course you can create a shortcut with the commandline to MSACCESS.EXE and your database, and that shortcut can have a custom icon.
You may also be interested in this answer by Albert D. Kallal: https://stackoverflow.com/a/24638829/3820271
I just developed this method yesterday to allow an Access Executable to have a custom icon. It does involve making some additions to your computer's registry. Be aware I did this for Access 2010 on a Windows 7 machine. I have not tested this for windows 8 or 10, but I do think it will be the same.
I know the entries of .14 ONLY refer to Access 2010. Access 2013 should be .15 and Access 2016 should be .16.
When you export your "accde" registry entries to a .reg file, stick with the .14, .15, or .16 that is exported for your specific system. The only thing you will be changing is any occurrence of "accde" to "accxx" with the "xx" being your new letters for your chosen suffix for the Access executable database.
Below is the .reg file that will perform the registry "fixes" and I have included a few notes along the way. This is not for the beginner, but I do believe a seasoned Access developer should be able to follow. Are you a little uncomfortable with the registry? Use Google to help you find a write-up or two about the registry and how to make changes to the registry.
OK, the .reg file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.accVR]
"Content Type"="application/msaccess.exec"
#="Access.ACCVRFile.14"
[HKEY_CLASSES_ROOT\.accVR\Access.ACCVRFile.14]
[HKEY_CLASSES_ROOT\.accVR\Access.ACCVRFile.14\ShellNew]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR\OpenWithList]
"a"="MSACCESS.EXE"
"MRUList"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
FileExts\.accVR\OpenWithProgids]
"Access.accVRFile.14"=hex(0):
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14]
#="Microsoft Access ACCVR Database"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\CLSID]
#="{73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\DefaultIcon]
#="C:\\_Work\\VR\\VR Logo.ico"
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell]
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell\Open]
[HKEY_CLASSES_ROOT\Access.ACCVRFile.14\shell\Open\command]
#="\"C:\\Program Files (x86)\\Microsoft Office\\Office14\\MSACCESS.EXE\" /NOSTARTUP \"%1\" %2 %3 %4 %5 %6 %7 %8 %9"
"command"=hex (7):79,00,6b,00,47,00,5e,00,56,00,35,00,21,00,21,00,21,00,21,00,\
21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,41,00,43,00,43,\
00,45,00,53,00,53,00,46,00,69,00,6c,00,65,00,73,00,3e,00,32,00,41,00,5a,00,\
7e,00,60,00,4f,00,37,00,71,00,43,00,3f,00,4f,00,57,00,2c,00,66,00,65,00,5a,\
00,79,00,63,00,78,00,68,00,20,00,2f,00,4e,00,4f,00,53,00,54,00,41,00,52,00,\
54,00,55,00,50,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,32,00,20,00,25,\
00,33,00,20,00,25,00,34,00,20,00,25,00,35,00,20,00,25,00,36,00,20,00,25,00,\
37,00,20,00,25,00,38,00,20,00,25,00,39,00,00,00,00,00
From top line down:
Any .reg file has to start with the correct name of the regedit.exe you will be dealing with. In this case I am dealing with Windows 7, therefore version 5.00.
The rest of the code in this file came straight out of the registry.
Within [HKEY_CLASSES_ROOT] I scrolled down to the entry ".accde"
Right click on this and select the "Export" option from the drop down menu.
Provide the folder and file name to export to.
Now you need to do the same within [HKEY_CURRENT_USER]. Here you will need to:
Scroll to Software, then Microsoft, then Windows, then CurrentVersion, then Explorer, then FileExts, and finally .accde.
Right click, select Export, etc.
And lastly, within the [HKEY_CLASSES_ROOT] scroll to "Access.ACCDEFile.14"
Right click on this and select the "Export" option, provide the saving info and save the file.
Put these three files together, leaving out the Windows Registry Editor Version line from the second and third files.
What I did from here was to create my own suffix rather than use the Microsoft .accde. I used the initials of the company this software is being written for. In this example, I will just use my own initials, VR. Keeping the ".acc" and just changing the "de" to whatever I will be using for the new suffix in order to use my custom icon.
You do not need to stay with only two characters.
In this new .reg file, carefully work your way through the file changing the "de" (or "DE") within any accordance of "accde" (or "ACCDE") you find.
For example, one of the places you will find "ACCDE" is in the string "[HKEY_CLASSES_ROOT\Access.ACCDEFile.14" Change the "DE" to "VR" (for this example) giving you the new string "[HKEY_CLASSES_ROOT\Access.ACCVRFile.14"
When you are finished, I suggest you search for the string "accde" within the file to be sure you have changed them all to the new suffix you are going to use.
Before using this .reg file to update your registry, BACKUP YOUR REGISTRY!!!

Show Window Account User's full name in report

I want to display the full username in my SSRS report. I used =User!UserID which gives domain\login.
Can I get the full name of the user like Tom,Cruise, instead of abc\tcruise.
The global variable you mentioned (User!UserID) is the only relevant built in variable, if you look at the built-in globals on MSDN, so I think you may have already answered your own question.
Some alternatives from the top of my head:
If you're running the report in your own app using the ReportViewer, you could use a hidden parameter and have the app pass the full user name.
A more heavy weight alternative you could try is using custom (embedded) code or assembly references, that may give you access to this info (not 100% sure though).