I am going crazy! I have managed to do this in a previous database and now I can't remember how I did it.
I want to create a shortcut menu for a report that when I right click the mouse button it gives me the option to print. When I select print on this shortcut menu it goes straight to the printer instead of giving me the printer dialogue box.
This is something I've been working on that very nearly works until it get to point DM
What I need to do is convert a build time for a single unit which is stored as mins:seconds into a build time depending on number of units being built then display the time as Hours:Mins.
I don't know of any functions in access that do this so have been playing with the code below which works upto the point of DM where I need to add the mins together then if more than 59 add the hour(s) to hours and then use the mins part as the total mins.
It needs a lot of cleanning up as been playing but hope somebody can help.
T = The Time IE 2:43 N = Number of units being built
Function GetTotalTime(T As String, N As Long) As String Dim M As Double, S As Double, Y As Integer, MZ As Integer, MS As Long, H As Single, Min As Long, MM As Long Dim DM As Long, Z As Integer Y = InStr(T, ":") If Y <> 0 Then 'Do The Mins Convert To Hours First M = Left(T, Y - 1) If M > 0 Then M = M * N 'Minutes * Number Of Units 'Convert Total Mins Into Hours M = M / 60 Z = InStr(M, ".") H = Left(M, Z - 1) 'The Left Over Mins Min = Mid$(M, Z + 1, Len(M)) End If 'Do The Seconds S = Mid(T, Y + 1, Len(T)) If S > 0 Then S = S * N 'Seconds * Number Of Units If S > 59 Then 'Has Minutes S = S / 60 'Convert Total Seconds To Mins.Seconds MZ = InStr(S, ".") MM = Left(S, MZ - 1) 'Dont worry bout odd seconds Else MZ = InStr(S, ".") MM = Left(S, MZ - 1) End If End If End If 'Now Add The Mins Together then / 60 to get hour /mins and add the hours to hours the remaining mins are the total mins element for build. DM = MM + Min
I'm working to put together a shortcut menu for a form that will be viewed as a datasheet. I'm trying to put together the vba to create the menu. I'd like a lot of the standard options i.e. sort a-z, filter toggle etc. I'd also like to add the menu option that is displayed in the default menu called "Text Filters". I've been unable to find the id code for that option, and since it, when chosen opens another menu, I'm not real sure how to code it. Here is what I have so far:
Sub CreateWIPShortcutMenu() Dim cmbRightClick As Office.CommandBar Dim cmbControl As Office.CommandBarControl ' Create the shortcut menu. Set cmbRightClick = CommandBars.Add("cmdWIP", msoBarPopup, False, True)
I am using Access 2003 and have a custom shortcut menu. I wish to add some entries to this shortcut menu dynamically.
Background : I am displaying a list of customer orders and wish to offer the user the facility to filter the search for one item instead of the default of ALL.
The dynamic entries would be the unique order item reference nos. retrived for that particular customer retrieved via recordset . So the menu would show :
ALL ------ Model 1 Model 2 Model 3 etc. ...
How am I able to add these entries to the menu, the selection text will be the filter text I use to report upon.
I finally got tired of having 100 macros managing my different custom shortcut menus, and decided to figure out how to generate the shortcut menus programatically (because lets be honest, Macros are the devil.)
I found a good tutorial here : [URL] .....
and was able to create some basic shortcut menus like the following:
Code: Sub CreateCopyShortcutMenu() Dim cmbshortcutmenu As Office.CommandBar Set cmbshortcutmenu = CommandBars.Add("CopyShortcutMenu", _ msoBarPopup, False, False) 'ID 19 adds copy command cmbshortcutmenu.Controls.Add Type:=msoControlButton, Id:=19 End Sub
Nice and simple, now I have a copy command. But the problem is that I also need some custom commands. Most (possibly all?) of these would be function calls.
I am building a db and i want to disable the Shortcut Menu (pull down menu at form's title bar) to prevent the users from closing the main form.
There is a Disable Shortcut menu setting in the File/Options menu but the whole db gets the setting.
I simply want to deny the users from accessing the Shortcut Menu when on the Main Menu (or a particular form) but allow it on other forms where Printing is required via the Shortcut Menu.
Im looking at 2 options; edit the shortcut menu or force a form to disable that w/o affecting other forms.
how to customize my right click "Short-cut" menu in Access 2010. I need a right click menu with ONLY the "Print" and "Print Preview" options for my reports and I would like to disable right click in all other objects.
I am currently in the process of creating a pop-up menu to allow my users to do some simple text formatting.I have used the following code to do so:
Code:
Dim cmbShortcutMenu As Office.CommandBar ' Create the new pop-up menu instance Set cmbShortcutMenu = CommandBars.Add("popupFormatMenu", msoBarPopup, False, True) ' Add the bold button
[code]....
The problem is that I now want to add the FontColor picker control and I keep getting an error.I think the problem lies in the type of control I want to add. According to the Microsoft support files I downloaded the fontColor control is of type Gallery and ID = 11949, so the code should look something like this:
Hi everyone, I was trying out the options on the startup item of the tools item on the menu bar and my access window has gone except the following menu items: File,Window and Help. Can someone kindly show me how to bring back these seemingly lost items? Thank you for your willingness to help me out!
hello, Here is my problem: i need from access or vb to run a non-window application,this application (in buisness basic) is generally run with an Icon on desktop, and needs to be associated with a text file wich contains path and other parameters to be executed, i tried with shell command but it does'nt work. In the shortcut (right click on icon appli) properties there is the target information and an other info to select path start application (called 'demarrer en' in french ,see image ), but i don't know how it is called in english, and i think this info is missing in my shell command, so the question is : How to give this info in shell command ? Or is it possible to run directly shortcut (lnk file) with VB ? Sorry for my english. Thanks in advance for help. VINCENT
I'm making a shortcut to a report in my database. I'd like to place the shortcut to the report onto my desktop.
The problem is I'm running both access2000 and access97. Even tho I've told the computer to open all access programs in access97, when I go to open that shortcut to the report it opens in access2000.
How do I go about getting the report shortcut to open with access97 as well?
(I do need to keep access2000 for some rare files)
I have created a desktop shortcut to access the network DB - but it does not work. Even finding the target database on the Network Places and double clicking to invoike Access does not work. The only way I can open the DB at present is to open Access first/ then select the DB file from the File/Open menu ....
I created a shortcut icon on my computer to access an Access dB that's located on the company server. The Access db opened, but immediately froze and wasn't able to do anything (not responding). Any suggestions as to why this happened and how to fix it?
I'm looking for a way to send an email from access that contains either a shortcut to this database(Product Change Database-CURRENT.mdb) or a hyperlink to it. I've tried using this sendmessage code, but it seems to only work for actual files and not shortcuts.
If I replace "C:TEMPREADME.TXT" with "C:TEMPShortcut to Product Change Database-CURRENT.mdb" it gives me a message "The system cannot find the file specified."
It would also be nice if it showed email to the sender(like in Sendobject) and let the user edit the email.... currently it immediately sends it. Maybe there is another way to do this, any help would be great.
Code:Private Sub cmdEmailPCR_Click() Dim objOutlook As Outlook.ApplicationDim objOutlookMsg As Outlook.MailItemDim objOutlookRecip As Outlook.RecipientDim objOutlookAttach As Outlook.Attachment ' Create the Outlook session.Set objOutlook = CreateObject("Outlook.Application") ' Create the message.Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg ' Add the To recipient(s) to the message. Set objOutlookRecip = .Recipients.Add(johndoe@test.com) objOutlookRecip.Type = olTo ' Set the Subject, Body, and Importance of the message. .Subject = "New PCR" .Body = "Please review this new product change request. Thank you." & vbCrLf & vbCrLf ' Add attachments to the message. If Not IsMissing(AttachmentPath) Then Set objOutlookAttach = .Attachments.Add("C:TEMPREADME.TXT") End If ' Resolve each Recipient's name. For Each objOutlookRecip In .Recipients objOutlookRecip.Resolve If Not objOutlookRecip.Resolve Then objOutlookMsg.Display End If Next .Send End WithSet objOutlookMsg = NothingSet objOutlook = Nothing End Sub
I remember there is shortcut keys for input field name when creating a queries. For example, when we try to create a query to combine field [firstname] and field [lastname] from customer table and we use: fullname:[firstname]+" "+[lastname]; instead of input this expression {fullname:[firstname]+" "+[lastname]} key by key, is there shortcut key that can input [firstname] into expression?
does anyone know how to create a shortcut for a command button? For eg, the caption of my command button is SAVE. how do i create a short cut (CTRL + S) for it? thanx
Trying to make a shortcut to join the workgroup and open a Db.
I made a shortcut for a Db, the shortcut defalt target was: X:RC-OfficeRC_OFFICdatabaseProjects.mdb
I edited the target line to: /wrkgrp ”X:RC-OfficeRC_OFFICdatabaseMS Access Workgroup.mdw” “X:RC-OfficeRC_OFFICdatabaseProjects.mdb”
I get wrkgrp not vaid target. I put the mdb file path first, I get not vaid target for the path to the Db. I would rather not put in the whole MS Access program file. This is on a server that I don't know much about. Not sure I would get the program file right. Help?
Hello,I need to know is there any way to protect a shortcut on desktop ?Bcz someone is deleting (I dont know by mistake or intentionally) shortcut of database shortcut. I thinking about its protection from deletion only unless you have to supply a password or code something like that.Any idea..?With kind regards,Ashfaque
Hi there, this maybe very simple but I can't seem to sort it out... I have a created a shortcut to my form database on my desktop but I want to know if there is a way in which I can make it so whenever I use the shortcut my database will open as a maximized screen as opposed to opening in a small window which it keeps doing, meaning I always have to maxmise (it may seem like something small but it gets quite annoying after a while) Can this be done? Or even better can I make it so that JUST the form opens and not the whole access program, as the other people using the database don't need to see and use anything else but the form. Any help would be much appreciated. Thanks
There is a local folder on each workstation holding the front end and I've given full access to this user and made sure the permissions propagated to the actual mde file itself.
There's one computer that tells me it can't find the db when I run the shortcut. It has the same setup as all others....
A problem I have seen a couple times has come up again... Wondering if anyone knows why this happens? This is always with a split DB.... Using "Remote Access"..... The user signs on, a shortcut to the Frontend of the application is there...... But when clicked... nothing. I personally did not load this one onto the clients server, but I believe the administrator has done this to use a bit of group security abilities. I think he has put the Frontend in their "Documents" folder and then puts a shortcut to the frontend on their remote desktop (Server)....... But time after time it loses the path to the frontend....or maybe doesn't recognize that it is an mdb file....Not sure. Anyone had this come up before??
Is there a keyboard shortcut to open a new query in SQL view?
I find myself encouraging carpal tunnel by: > going to "queries" > "new query" > "design view" > closing the "show table" dialog box > right clicking the new query > finally selecting "SQL view".
There has GOT to be an easier way that this 6-step process to ~run a query~ in a _database_ ... but I haven't run across it yet though. Any help here? My wrist thanks you ; )
does anyone know how to create a shortcut for a command button? For eg, the caption of my command button is SAVE. how do i create a short cut (CTRL + S) for it? thanx
I have created custom menus for forms. The menus come up and go away as needed when the form is open. No problems there. The problem is that the ALT shortcuts aren't working when the form has the focus. If I leave the database main window open and give it the focus (form is popup) the ALT+ works fine, but when the database is complete I will be hiding the database window. I have experimented with that already and still get the same results. I have tried making the form modal and popup, popup only, modal only, and neither. No matter the configuration:eek: , the ALT+ does not seem to work. In case it isn't clear, ALT+C if the menu is &Control, etc...And I have removed the built-in menus so there is no conflict that I'm aware of with the ALT+ commands.
I'd appreciate any help you can give on this problem.
I am having problems with a database that is on a network. When I update it, the computers that have a shortcut on their computer to this database does not get the updates. How can I make sure that my updates are also on the computers with the shortcuts. Thanks