List Box (need Right-click Menu)
Aug 11, 2005
Hi All
A quick question.
Is it possible/Easy to wipe out the standard menu for right clicking a listbox
and replacing it with a custom menu.
I would like to make some custom functions for adding and deleting records using list box contol instead of having a huge amount of buttons all across the screen
Thanks Homer
View Replies
ADVERTISEMENT
Aug 3, 2005
I have locked my db down so that no one can use the right-click options will in it. I did this to lock them out of the filters and properties options. Does anyone know how I can allow them to use the right-click with the mouse to only do cut, copy, paste, and hyperlink? Thanks
View 2 Replies
View Related
Mar 7, 2013
i need the way for making a popup menu on the right clic of the mouse inside a form...so when i pree right mouse button i will have my list with my commands.
View 8 Replies
View Related
May 1, 2015
I have the following script which customizes the right click menu.
The problem that I am having is that I call the script to add the right click from the form open event and then multiple users can not access the same database.
I use one for forms and then another for reports.
If I manually close the open forms then reopen them then multiple users can use the same database.
If I close and reopen forms with vba the right click still remains making the database not accessible to multiple users.
It is definitely this as when I comment it out from the open event of the forms then everything is OK.
I call the following from the open event of the form as follows
Code:
Public Sub Form_Open(Cancel As Integer)
FormsShortcutMenu
End Sub
The following is stored in a module
Code:
Public Sub FormsShortcutMenu()
Dim cmbRightClick As Office.CommandBar
Dim cmbControl As Office.CommandBarControl
On Error Resume Next
CommandBars("cmdRightClick").Delete
[Code] .....
View 4 Replies
View Related
Dec 27, 2013
I am making a custom right click menu for our company database using this tutorial:
[URL] ....
The thing I can't find when making this macro is copy or paste. I want to add these to it but I can't find it using run command or anything. How to get these 2 in the menu?
View 1 Replies
View Related
May 1, 2006
Hi,
For i = 1 To CommandBars.count
If (CommandBars(i).name <> "Right Click Mouse") Then
CommandBars(i).Enabled = False
End If
Next i
I tried to use this code.
However, right click mouse is disable.
How can I disable all menus except the right click mouse option?
Thanks.
View 1 Replies
View Related
Aug 18, 2014
How do I remove items from a right click menu in access 2003? For example I need to remove the form view / design view button from a right click menu but i want to keep the hide/show columns button on the same menu.
View 1 Replies
View Related
Sep 17, 2014
the login is working perfectly, once It logs in there is a button to expand all that is based in JS. I can't seem to work out how to get it to click the button to expand the whole menu, latest code is below:
Code:
Option Explicit
Function Checkpage()
Dim IE As Object
Dim lform As Object
Dim Document As Object
Dim item As Object
[code]...
View 3 Replies
View Related
Aug 13, 2014
I have a form that i used the following code on to stop people accessing anything naughty:
Code:
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
This works great and gets rid of all the menu bars.
The problem is that it also stops the user getting the right click menu up in a datasheet view.
I assume i just need to enable the correct menu bar index number but i don't know what it is so my code would be:
Code:
CommandBars(X).Enabled = True
So do I need to bring back more than one command bar to get it working?
View 4 Replies
View Related
Dec 11, 2013
I'm trying to do right click menu on listbox.
currently i'm trying to implement a right click menu which will show a simple messege box.
My problem is that the list box is on a pop up form which opened up maximized. Now when i'm right clicking on the list box i see the right click menu but when i'm clicking on one of the menu options, nothing happenning (it seems that it don't go to the function as it should). i've also putted breakpoints on the function but it never tips.
It's important to mention that if i'm setting the form popup option to no the right click menu works perfectly (when i'm clicking on one of the options i see its matching messege box).
I'm running the following vba code:
This is the mouse up event handler for my list box:
Private Sub Song_List_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' Call the SetUpContextMenu function to ensure it is setup with most current context
' Note: This really only needs to be setup once for this example since nothing is
[Code] .....
setting up the "SetUpContextMenu" sub:
Public Sub SetUpContextMenu()
' Note: This requires a reference to Microsoft Office Object Library
Dim combo As CommandBarControl
' Since it may have been defined in the past, it should be deleted,
' or if it has not been defined in the past, the error should be ignored
[code].....
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
Mar 31, 2008
Hi all, i have a list box (well three), and none of them will let me click them when populated with data.
I have written a small piece of code to display a messagebox
e.g
msgbox me.list33.value
anyone have any ideas why list boxs cant be clicked.?
blu
View 1 Replies
View Related
Feb 12, 2006
Please see attached database
Main form is frmPatients
If you click on the main form called frmpatient you will see 2
text boxs one called Primary Insurance the other Called Secondary Insurance
Above those text boxes are to hyper links which open the list box
What I'm trying to do is if a user double clicks the name of the Insurance
From the List Box it will insert that Name of the Insurance Into either
The Primary Insurance or Secondary Insurance Text Fields
I do not Want to Use combo Boxes because I have about 1,000 Insurances in my database.
Please Help
View 3 Replies
View Related
Jul 16, 2006
:mad:
Hi all I cannot get it to work, I have a combo box that on double click should open a form to add the item with all the relevant details, when ài double click on th combo box it does open the form but not in a add mode, it actually opens it on the first record of the DB, th vb instruction is as following:
Private Sub CP_DblClick(Cancel As Integer)
On Error GoTo Err_CP_DblClick
Dim ImgEventTypeID As Long
If IsNull(Me![CP]) Then
Me![CP].Text = ""
Else
IngEventTypeID = Me![CP]
Me![CP] = Null
End If
DoCmd.OpenForm "Crew Members NV", , , , , acDialog, "GoToNew"
Me![CP].Requery
If IngEventTypeID <> 0 Then Me![CP] = IngEventTypeID
Exit_CP_DblClick:
Exit Sub
Err_CP_DblClick:
MsgBox Err.Description
Resume Exit_CP_DblClick
End Sub
Can some one help me:)
View 1 Replies
View Related
Apr 7, 2008
I have the following code attached to a form:
Private Sub Go_To_Project_Click()
On Error GoTo Err_Go_To_Project_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Project Main"
stLinkCriteria = "[R&D ID#]=" & Me![lstsearch]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Go_To_Project_Click:
Exit Sub
Err_Go_To_Project_Click:
MsgBox Err.Description
Resume Exit_Go_To_Project_Click
End Sub
Private Sub txtsearch_AfterUpdate()
Me.lstsearch.RowSource = "Select [R&D ID#], [SKU#], [Project Name], [Construction level], [Manufacturer], [Hobbico Status], [R&D Work By], [Product Manager], [Desktopper]" & _
"From [Project Main]" & _
"Where [Project Name] like '*" & Me.txtsearch & "*'" & _
"OR [SKU#] like '*" & Me.txtsearch & "*'" & _
"OR [R&D Work By] like '*" & Me.txtsearch & "*'" & _
"OR [Product Manager] like '*" & Me.txtsearch & "*'" & _
"OR [Desktopper] like '*" & Me.txtsearch & "*'" & _
"OR [R&D ID#] like '*" & Me.txtsearch & "*'"
Me.lstsearch.Requery
End Sub
Private Sub Exit_Search_Click()
On Error GoTo Err_Exit_Search_Click
DoCmd.Close
Exit_Exit_Search_Click:
Exit Sub
Err_Exit_Search_Click:
MsgBox Err.Description
Resume Exit_Exit_Search_Click
End Sub
Basically a text string is entered in the txtbox and a list of matching records shows up in lstsearch box. One selects the desired record in the lstsearch and clicks on the "Go to project" button and the appropriate form (aka "Project main") and subform (aka Project History) open up with the desired record and record history.
What would I need to add to lstsearch so the users can double-click on the record to open it instead of selecting it and clicking on the "Go to project" button?
Thanks
mafhobb
View 10 Replies
View Related
Aug 1, 2013
how I can have a shortcut option when right click on each item on the list box. So I got my answer with below code that opens another form "frmshortcut" with a listbox inside that shows list of options like "new task" , "edit item" . Now my problem is (like attached picture) the shortcut list (frmshortcut) will be open in another place when I right click the mouse, it is far from location of click. Also it shows some default in access when I right click in the listbox ("subform", "cut", "copy"), actually I do not like it shows these, just I like it shows shortcut list I have defined by the list box.
Private Sub ItemList_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Const RIGHTBUTTON = 2 If Button = RIGHTBUTTON Then DoCmd.OpenForm "frmshortcut"
' DoCmd.OpenForm "frmshortcut", acNormal, , , , acDialog
Forms!frmshortcut!txtparameter = Me.ItemList.Value
End If
End Sub
View 1 Replies
View Related
Aug 31, 2013
I have a form (about patients) containing a listbox (list of visit dates) and a subform (showing medications at that date). When you click on the listbox, the subform is re-queried with the selected date as a parameter to show the medications that were in use on that date. This is working fine.
However, when you move to a new record (patient), the subform is initially blank because the listbox hasn't been clicked on yet. This means that it looks like the person isn't on any medications, which is causing some confusion.
I need a way to have the subform show the "top" (most recent) date because that is the current medication list, and the thing most people want to see first. It is always the top of the list, so I would like to do something like this (pseudocode)
Code:
Private Sub Form_Current()
Forms![MedSearch].SelectDateBox.Requery
Send MouseClick Event to line 0 of SelectDateBox
End Sub
View 2 Replies
View Related
Jan 21, 2013
I would like to know how on a report to make a button action that when i click it present information from contact list (full contact details).
View 1 Replies
View Related
Nov 6, 2012
I have a form, "Update Employee Information" that allows me to navigate through records and change data like name, adress, etc. I would like to know how to create list (or autofill) so that it won't take long before finding an employee.For example: I have a Employee ID and would like to search on that so the form can fill in the rest of my information. I have thought of two methods that I like:
(1) Click on a list "Lookup Employee", select ID and then the form will fill in the rest
(2) Without clicking a link, typing in the ID in the form and the rest of the data gets filled in.
View 5 Replies
View Related
Sep 13, 2005
Im not sure if this is the right place to put this but I was wondering if you could help me:
Say I have database with forms that display records or people ie name, address, postcode, etc. What I want to do is display a list of Names then from that list I can double, single click and open the record details.
Id call my self and amatuer at access and am probably guessing this is done via vscript or something else, but any help will do.
Thanks
Alex
View 14 Replies
View Related
Aug 28, 2004
Hi,
is there any (reasonably simple) way to select or deselect multiple items from the List Box with individual clicks without using Ctrl key. Eg first click on an item would select it leaving all other items as they are, subsequent click on the already selected item would deselect it etc. I hope this is not too confusing and I would appreciate some help.
Thanks!
View 1 Replies
View Related
Feb 19, 2007
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!
View 2 Replies
View Related
Nov 7, 2006
Often I use Labels as buttons due to the fact I can colour them the way I want, and use the on click event to trigger code.
The code below however works for a command button, but not a label button.
DoCmd.OpenForm "frmdatetime"
Do While Forms!frmdatetime!OKFlag.Caption = "False"
DoEvents
Loop
When this code is run by clicking on a command button, it works fine.
If run by clicking on a label, frmdatetime opens, but the mouse will not work on either of the 2 open forms unless you go down to the windows task bar, jump onto another window, and back onto frmdatetime.
If I remove the loop with the DoEvents in it, then the problem does not occur.
Can anyone enlighten me as to why this behaviour occurs.
Thanks
Richard
View 4 Replies
View Related
May 15, 2006
Ok, This is something I have long wanted to do, but cannot figure out.
I am working on a database for a company that orders a large number of Items. I have these all in one table (itemCode, itemDescription, price, categoryCode, etc). I have another table with categorys (categoryCode, categoryDescription) . Each Item is asigned a categoryCode and the appropiate relationship exsists. Right now I have a comboBox in a form that when selected opens a drops down menu with all the Items. Then another one auto loads up (continuous form) and I get the same drop down list of all the Items.
What I would like to have is a combo box then when it is selected shows the categorys, then based on that selection, I see all the Items that are in that category.
I guess another way of saying this simply is, I would like to create a drop down menu inside of a dropdown menu.
Is this possible? Does anyone have another alternative suggestion that might work well? I'm relectant to use a list box, becoase ideally it would be a drop down menu inside of a drop down menu as seen on many websites.
Thanks in Advance!
:)
View 2 Replies
View Related
Mar 28, 2014
In my access form I provide the user a list of locations from various countries in a listbox . But the list is too long so I provide him a combobox for selecting a country. Selecting the country should update the listbox showing only the locations in that specific country.
So my SELECT from the listbox must cover the unselected state and show all entries and when a country is selected it must narrow the selection.
I tried to get this happen with the following SELECT statement containing a variable. Choosing a country in the Combobox results in a change of the variable and in a requery. This works after the first country is selected and for each country change, but the initial list is empty.
VBA in the loadform
'Application.TempVars.Add "varcountryselect", "*"
SELECT in the listbox "lstlocationsperproject"
SELECT tbllocations.locationID, tbllocations.country, tbllocations.localstreet, tbllocations.localcity FROM tbllocations WHERE ((tbllocations.country) Like [TempVar]![varcountryselect]);
VBA in the combobox
Application.TempVars("varcountryselect") = [Form]![kombcountryselect].Column(0)
Me.lstlocationsperproject.Requery
The values in [kombcountryselect].Column(0) are texts like "SPAIN", "MEXICO", etc.
Any hints, how I have to use the * for getting the complete list on the initial view ?
View 5 Replies
View Related
Dec 14, 2006
Hi All a newbie here so any help will be appreciated,
sorry for the long post but trying to give you all the information you might need.
I wrote a basic access database for my Church to aid in a paperwork audit for a charity food drop which we do monthly to give free food to the needy.
But each month it gets harder to find out who was in line first so I thought with all your help we may be able to randomize the names each month in a different order as to avoid confusion and also avoid people waiting in line as they turn up at 5am and we don't start until 9am.
So if this will work in access they can all come for 9am
I don't mind creating a new database and adding the additional information, if that's what it would take.
My Background I have created basic databases from scratch not using wizards, But I don't know much about code or how to implement it so any help in where code goes it would be very much appreciated.
Database details (Microsoft Access 2002 version)
Table Name = details
Field name = ID (auto-generated)
Field name = FirstName (text)
Field name = Surname (text)
If possible it would be nice to keep a record of the randomized lists (in the database somewhere ?) each month in case anyone wants to see it or disputes the lists, where I can just create a report to show the details.
There will be approximately 90 to 125 names.
Thank you in advance for all your help in this matter
Britgent
View 1 Replies
View Related