
- Access runtime 2010 vba application printer error how to#
- Access runtime 2010 vba application printer error code#
Access runtime 2010 vba application printer error code#
You can also view the code from this utility.
Access runtime 2010 vba application printer error how to#
The utility also illustrates how to manipulate the Printer object and the Printers collection introduced in Access 2002.Ĭlick to download the utility (30KB, Access 2002/3 mdb format, zipped). The utility works with MDE files and runtime versions also. Whenever they open the report, it is sent to that printer. This utility lets the end user assign one of their printers to each report. You can design a report to use one of your printers by choosing Page Setup from the Page Setup ribbon (Access 2010), the Report Tools ribbon (Access 2007), or the File menu (previous versions.) But that approach is useless if others use your report: you do not know what printers they will have installed. RE: Application.Microsoft Access: Applications and Utilities The confusing thing is that I have other databases which will allow this command to execute while other forms are open.Īny ideas what could be the problem here and why APPLICATION.QUIT will not run with these forms open? The open form is a hidden form which was opened with the POPUP property set to TRUE as when viewed its on the top of a maximised form and I wanted it to appear as a dialog on top.Īny further comments owuld be appreciated I setup a function to close all open forms except one, which I kinda wanted to keep open, however the error still happened.Īfter you post I changed it so that it closes all forms before running APPLICATION.QUIT and it did work. RE: Application.Quit - Runtime Error 2046 PHV (MIS) 17 Nov 04 12:39 Better that I devote myself to study the other great mystery of the universe: Women!". However this produced the error aswell.Īny help of suggestions would be gratefully received. I therefore thought I could workaround it by making the above code open a dialog box which I could then use to execute the APPLICATION.QUIT line. I tried putting the APPLICATION.QUIT line begind a button on a blank form and it worked fine. I have some code which runs at db startup which disables the application close button (top right) - I originally thought that this was the cause of the error, but having removed this completely. This then prevents the database from closing.

The Command Or Action 'Quit' isn't available now

MsgBox Err.Number & " " & Err.Description 'DoCmd.OpenForm "frmQuit",, ,, , acDialog

IntlogID = DLookup("", "tblUseagelog", "userid='" & UserID & "'" & " And logondate=#" & dteLogon & "#" & " And logofftime=null") Set rst = db.OpenRecordset("tbluseagelog", dbOpenDynaset) Function LogOff(UserID As String, dteLogon As Date, dteTime As Date)
