Access COMDLG32.dll Reference Gone - ms-access

To make a specific application work on another user's machine, we removed a reference for Microsoft Common Dialog Control 6.0 (SP3), or "COMDLG32.dll", from the application. We thought this would be appropriate because the application appeared to compile just fine without it.
Unfortunately, this was a trick. The reference appears to be required for different control boxes used throughout the app. Now that it's been removed, I can't seem to locate it in the References selection box in Access's VBA editor.
It used to be referenced by name (Microsoft Common Dialog Control 6.0) in the list of Available References to add to the application. Now, I'm only able to find the reference if I browse to the list of common references. "COMDLG32.dll" is an option. However, if I select the file, I'm told that I'm unable to use the reference.
Help?

Related

VS 2013 Find All References Not Working in cshtml Pages

I have a Web Pages (Razor) c# app and I have moved it to VS 2013 Community Edition Update 4
Previously, when I wanted to see where a variable or function was used/references, I used the "Find ALl References" tool (Shift + F12) and I would get a list of each occurrence and where it was found (page and line).;
Now I find that the only time I can get Find All References to work is on a cshtml page within the App_Code folder. It does nothing in pages that are in the top-level project folder (i.e., the pages which make up the bulk of my website). I highlight a variable and hit Shift+F12 (or click on Find All References in the right-click menu) and nothing happens: no hour glass, no flicker, no list of references (even though the page is riddled with references to the highlighted variable).
Is there some setting or something that can make this useful feature work in the cshtml pages in the top-level project folder like it does in pages in the App_Code folder?
It seems that Visual Studio 2013 is lacking this feature. I cannot say if Visual Studio 2015 has fixed this issue.
What I do:
Find all CTRL+SHIFT+F
Search MyPublicMethod( or .MyPublicProperty
Search in file types: *.cshtml
Problem with this approach: if you have duplicated properties in multiple classes (name, url, ...) you will not be able to tell to what class the property belongs without reading your code.

Create a standalone form shortcut in Microsoft Access 2013

I currently have a functioning form that searches through my database by calling a query. What I'm trying to do is turn this into a standalone application where I can simply open a file and only the form opens, running the database on the back-end. I have tried running a macro that opens the form, and I have tried creating a shortcut to my desktop, but nothing has worked.
Does anyone have any suggestions? Anything that will only show the form and the search results would be good (desktop shortcut, HTML file, etc.).
Thanks!
You will need to split your database so that the tables are located in a separate back-end file (which can be kept on a server). These instructions apply to Access 2007 and 2010 but the process is very similar for 2013.
Once this is done, your tables will become linked tables (stored in a separate file) and your front-end .addcb file will only contain queries, forms and reports.
You can control which form opens when the application loads through File -> Options -> Current Database. There are also several other useful controls here for limiting what the user can do; ie.
Hiding the list of database
Hiding the tabs (you will therefore need to create buttons to move between forms)
Hiding the Ribbon and/or status bar
Disabling Layout View
It's safest to change these settings on a copy, so you don't inadvertently lock yourself out; however, by holding down shift when opening the file from within Access, most of these options will be bypassed and you will be able to edit the database / revert these settings should you need to.
In terms of making it a "stand-alone application", it is possible to create a copy that will open without requiring the full version of MS Access on the user's PC (instead using Access Runtime).
I always distribute my front-ends as .accde format (File -> Export ACCDE). The benefits are as follows:
Smaller file size
Optimise memory usage / improves performance
VBA code runs but cannot be viewed or edited
I think what you're looking for is here:
http://office.microsoft.com/en-us/access-help/command-line-switches-for-access-HA010166605.aspx
and
http://office.microsoft.com/en-us/access-help/command-function-HA001228801.aspx
Basic idea, create a macro called AutoExec that checks for a command line argument when opening the database. Setup a shortcut with a command line argument (whatever you decide to name it, I'll use 'lookuponly' as the example.) like this:
"C:\Users\%Username%\Desktop\MyDatabase.mdb" /cmd "lookuponly"
when you double click the shortcut it should auto-run the macro and open your lookup form. Of course under newer versions of access you'll have to set the location of the database as a trusted location or access will attempt to block the database.
http://office.microsoft.com/en-us/access-help/decide-whether-to-trust-a-database-HA010256412.aspx

How do I combine the controls from 2 or more C++ MFC OCXs into 1 OCX?

It has been decreed that we will merged several (C++) OCXs, all of which use MFC as a static library, into 1 OCX, to save the download overhead of multiple copies of C runtime. Management is afraid that the shared DLL setting may cause an installation problem on some version of windows. I am unwilling to play "you bet your job" that they are wrong.
I have merged 2, by turning 1 into a static library and linking it into the other and adding the linked type library as a resource. I am attempting to load the linked control into an ASPX , by its guid. IE finds the merged OCX (because I modified the registry). The combined OCX loads, but the linked control does not.
To FORCE it to load, I manually create a new instance in the OCX "application" code.
Now, it won't receive commands from IE or send events. Creating the linked control's frame fails, but the LastError is 0.
I've tried other approaches to merge the controls; this is the first one to build and register.
How do I combine the controls from 2 or more OCXen into 1?
How can I get some diagnostic information about my linked control's failure to create its frame?
What am I missing?

create a customised openFileDialog

i have an access program which i have been working on and i want to create a openFileDialog which will show specific folders and files. For e.g. when you click a button, instead of having the dialog showing all the folders and files, it will be given a parameter (folder name) and it will show only that folder. i am trying to achieve something similar to the windows search engine. the reason is that, my program has a folder which contains around 1000 sub folders which contain a documents. each subfolder has the same name as the document it contains. therefore, what i an trying to achieve is that from my Access Form, the user can click a button, and a dialog will pop up showing only the folder which contains the document the user is working on.
is this possible.
i would really appreciate your help thank you
Do you mean you want OpenFileDialog to start in a specific folder?
You can do it like this:
OpenFileDialog MyOpenFileDialog = new OpenFileDialog();
MyOpenFileDialog.InitialDirectory = "C:\Path\To\My\Selected\Subfolder" ;
MyOpenFileDialog.ShowDialog()
Access provides Application.FileDialog. If you want to use the ENUM for the dialog type, you'll have to add a reference to the Office Object library, but if you try to use the enum you'll get prompted and Access will add the reference for you. It's not much use, though, as it can otherwise be used quite easily with object variables instead of strongly-typed variables.
To learn how to use it, open the Immediate Window (Ctrl-G), type Application.FileDialog, and hit F1. That explains the basics.
For what it's worth, I was using Windows API code from the Access Developers Handbook before the Application.FileDialog was introduced (with A2002), so I continue to use that. I am pretty sure the functionality is identical, though Application.FileDialog probably has a spiffier interface (I don't know -- I don't use it!).

Unused forms/objects MS Access

Is there any way I can identify unused forms/reports/queries in a compiled Access (2003) project?
Edit : There is no check for unused objects menu item in my database window.
AccessContextMenu http://f.imagehost.org/0551/AcessContextMenu.jpg
Yes, in the Database window, right click on the object (form/report/etc) and select "Object Dependencies". If it doesn't show up any where, it probably isn't used.
Although that doesn't tell you if it is called in VBA code somewhere. However you can almost totally eliminate that possibility by doing a search for the object name when viewing the VBA and make sure that you have "Current Project" selected instead of "Current Module". It doesn't prevent some evil coder from string concatenating the object name together somewhere; but it's unlikely.
Try SpeedFerret over anything from fms (it has add'l features that will probably be useful to you as a developer, and it supports .mde files).
A demo can be obtained here:
http://www.moshannon.com/downloads.html
Other useful MSAccess utitlities:
http://www.granite.ab.ca/access/thirdparty.htm