Forms :: Adding Entries To Shortcut Menu Dynamically
Jul 26, 2013
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.
View Replies
ADVERTISEMENT
May 15, 2014
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:
Code:
cmbShortcutMenu.Controls.Add Type:=msoControlButton, id:=11949
I need to replace msoControlButton with something else.
View 1 Replies
View Related
May 24, 2013
I would like to add a page to a tab form when a certain button is clicked. I don't want to use the visible/hide solution. So I already found out that this can only be done in design view. I am using the following code:
Code:
Private Sub cmd_StrategyAdd_Click()
DoCmd.OpenForm "Form1", acDesign
Me.tabMain.Pages.Add
DoCmd.OpenForm "Form1", acNormal
End Sub
I am getting the error: Run-time error 2467. The expression you entered refers to an object that is closed or doesn't exist.I am sure the name of my tab form is tabMain.
View 14 Replies
View Related
Mar 13, 2007
Hello,
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.
Please help!
Thanks
View 4 Replies
View Related
Jun 5, 2014
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)
[code]....
View 2 Replies
View Related
Aug 16, 2013
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.
View 3 Replies
View Related
Dec 10, 2014
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.
View 3 Replies
View Related
Mar 29, 2015
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.
View 3 Replies
View Related
Nov 15, 2014
I have quite an extensive form linked to a table. When I add new columns to the table I seem to have a problem getting the form to read the data.I have just added a numerical column to the table and added a text box on the form that is bound to it. When I try to pull up the value using VBA it is blank, even though an entry is visible on the form. I have set the text box to general number and the entry shows in the actual table. When typing in the entry into VBA it capitalises where required so it must be registering the table entry. However the value it pulls remains blank.
View 2 Replies
View Related
Dec 9, 2005
I have a form that has several rows of controls (comboboxes, textboxes, checkboxes, etc)
Each row is exactly the same. There is one row for every 'driver' in the 'SalesDrivers' Table.
Instead of manually adding a row when we add a new driver I would like to form to dynamically create the form based on the drivers in the table.
Any suggestions?
View 6 Replies
View Related
Aug 19, 2015
I have a table called exiting staff data and a field called Follow up required. I want to count the number of Yes entries and display it on the main menu. Have tried
Code:
=Count([Exiting Staff Data].[Follow up required]="Yes")
And using dcount but keep getting error messages.
View 13 Replies
View Related
Mar 5, 2007
Hi
I have 120 tables, each with the same name except 2 identifying characters at the end eg pc_dist_ab, pc_dist_al
Each table currentnly has 3 columns.
I would like to be able to add 2 additonal columns to each table with one query and was hoping an alter table query where the table name matches pattern would have worked but evidently not.
Is there a way to build some sort of dynamic query to add extra columns to these different tables at the same time?
To save another post I guess Once this is done I would then like to create 1 main table by creating a new table and appending all the files together- again I would prefer to be able to run this once.
I'd appreciate any help/thoughts as to whether this can be done?:confused:
Thanks
View 1 Replies
View Related
Nov 12, 2005
I coulnt figure out how to reply to a reply. This is a follow up question to a previous post.
I can now create a new column in my access db through my web form.
Here is the script:
ALTER TABLE FAQ ADD City varchar(30)
this adds a new column called city.
Here is my problem:
Every time a user asks a question, that question will be in the new column created.
I need the newly created columns to have unique names.
I tried creating a form with a text file (to simulate where they type in their question) then post to post.asp.
post.asp holds the script.
I replaced city with ::T1:: (the variable of the text file), but got an error.
Creating columns dynamically is worthless unless there is a way to make the column names unique.
Can anyone shed some light on this problem for me?
Much appreciated
Mike
View 3 Replies
View Related
Aug 20, 2012
In Excel, I can dynamically add option controls to a frame on a form using the Control.Add method. Is there an Access Equivalent? I can only find Count & Item as Control. items.
It might have something to do with design view i guess.
View 5 Replies
View Related
Oct 8, 2015
how to add a Menu in Access 2007 where I can click on menu options and it takes me to whatever form or report I clicked on in the menu?
View 6 Replies
View Related
Jul 28, 2014
I have a query built that gives me info per employee. I built a question into the criteria that ask for the employees name. When a person types the name results are given. If the person mispells the name, results are not given.
I have everyones name on a seperate table. How do i create a pull down menu on the query to choose the names?
View 7 Replies
View Related
Jul 5, 2005
This might be confusing so I will try to give as much detail as possible.
I have a table that has part numbers and the number of that part used that is based on a construction group lets call it.
I have another table that has all the different products that we sell, it also contains the "constuction groups" that are needed.
My append query looks to see which product is being ordered, gets the "construction groups" then looks at the other table and gets all the part numbers and quantity used in that group. It takes the part number,quantity used and appends them with an order number into another table. This works fine, however because some of the "construction groups" use the same part number I have multiple entries for some parts.
I want to be able to make it so that when there are multiple entries where the order number and part number are the same, it adds the 2 quantities and leaves only one record.
If someone out there even understands my problem could you help me. I have been trying to get this part of my db workign for a few weeks now.
View 2 Replies
View Related
Dec 6, 2012
I have a field named Supplies Expense. As an analyst inputs a business's expenses, it may require multiple entries into this one field. What is the best way to accomplish this?
For example:
Supplies Expense (Field Name) [$0.00]
The analyst has the following data:
2009 Financial Statement
Paper $50
Depreciation Expense N/A
Ink $100
So, going down the list, the analyst goes into access and enters $50 for paper then later needs to enter $100 for ink.
What is the best way to combine these multiple entries into a single Supplies Expense field and allow for a quality check of the individual numbers at the end of the project?
View 8 Replies
View Related
Jul 2, 2014
I have a table that is linked to a survey and pulls data from the limesurvey backend.
The user would like to add a local field, so they can add entries to each row of data.
Is that possible ?
View 1 Replies
View Related
Dec 30, 2013
I have a query with various entries, pertaining to various invoices. Each line of the query corresponds to a piece of work done, and there may be several lines in the query pertaining to one invoice. I've written the code to input data to a report.
If there are multiple lines in the query to be added to the one invoice, I don't know how to write code that will add those multiple lines in the detail section. Same type of data on each line, just basically pertains to several different lines of work.
View 3 Replies
View Related
Jul 10, 2015
Is there any way to add parameters to a .maf shortcut?
I'm thinking, I may be able to email the link to a form to someone, with the correct ID. But I'm assuming this isn't an easy thing to do?
View 9 Replies
View Related
Mar 10, 2014
If memory serves me right, I've seen code or maybe a shortcut somewhere for inputting a date value in a form along the following lines.
To input today's date, input "0"
Yesterday = "-1"
A week ago = "-7"
and so on.
View 6 Replies
View Related
Oct 21, 2013
I am running Access 2010. I have added the following to the "On Open" event on my main form:
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
Me.ShortcutMenu = False
End Sub
My main form (frmMain) is displayed when the database opens. As you can see, I am hiding the ribbon and the navigation pane from users. I also want to prevent users from right clicking on the form and opening it in Design view - trying to prevent any monkey business. However, the line:Me. ShortcutMenu = False
is not preventing users from right clicking on the form and getting the shortcut menu and going into Design view.If I go to Options and uncheck: "Allow Default Shortcut Menus" then I lose the ability to print reports because I have the ribbon hidden and this will not allow right click on reports.Converting to .accde is not an option at this time.
View 1 Replies
View Related
Mar 24, 2015
I would like to disable the shortcut, CTRL - which allows a user to delete a record. A user accidentally deleted a record while typing in an email address that had an underscore in the email address. While trying to type it she must have hit the CTRL key instead of the Shift key follow by the -. She noticed the delete confirmation, but not thinking, pressed enter and thus confirmed the deletion of the record.
Other than telling her to pay more attention, how can I disable the shortcut in Access 2013?I tried using the Application.OnKey "^-", "" but I continue getting the error method or data member can not be found
View 2 Replies
View Related
Oct 28, 2014
Is there a keyboard shortcut that simulates the double click.
In my Sectionfrm I have a command button that opens my Ordersfrm. Because I use the Ordersfrm for reasons not always associated with the Sectionfrm I do not automatically populate the SectionID (textbox) in the Ordersfrm with the SectionID from the Sectionfrm.
When I want to link an order to a (building) section I double click the SectionID field in the Ordersfrm which in turn runs VBA code that copies the SectionID from the Sectionfrm to the Ordersfrm.
As I tab through my form I find it annoying to move away from my keyboard to the mouse to double click the SectionID, so the question is:
Is there a keyboard shortcut that simulates the double click to run the VBA code?
View 2 Replies
View Related
Oct 31, 2013
I am making a database that will be used by multiple people on a network, and they have different resoloutions on their own computers. when the database is loaded on their respective computers, the form controls are all off.
On the computer i designed them on, the forms fit perfectly on screen, as do the controls, i would like to know if there is some vba code i could incorporate into the form open event, or module code that i can use in order to dynamically re-seize the forms and all of the controls to suit different resoloutions?
View 6 Replies
View Related