Customize right click menu

samedi 2 mai 2015

I have the following script which customizes the right click menu and I love it.

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
Set cmbRightClick = CommandBars.Add("cmdRightClick", msoBarPopup, False, True) 'NEW COMMANDBAR
 
With cmbRightClick
   
        Set cmbControl = .Controls.Add(msoControlButton, 502, , , True) ' ViewsFormView
        'Set cmbControl = .Controls.Add(msoControlButton, 2952, , , True) ' ViewsDesignView
       
       
       
        Set cmbControl = .Controls.Add(Type:=msoControlButton) 'design view by closing and reopening form so is quicker
        cmbControl.BeginGroup = True                  ' Add a line to separate above group
        cmbControl.Caption = "Design View Quick Load"        ' Add label the user will see
        cmbControl.FaceId = 2952        ' Add label the user will see
        cmbControl.OnAction = "DesignViewFunctionFORM" ' Add the name of a function to call
       
        Set cmbControl = .Controls.Add(Type:=msoControlButton) 'design view by closing and reopening form so is quicker
        cmbControl.BeginGroup = True                  ' Add a line to separate above group
        cmbControl.Caption = "List Report Name"        ' Add label the user will see
        'cmbControl.FaceId = 2952        ' Add label the user will see
        cmbControl.OnAction = "TestingReportName" ' Add the name of a function to call
       
        Set cmbControl = .Controls.Add(Type:=msoControlButton) 'design view by closing and reopening form so is quicker
        cmbControl.BeginGroup = True                  ' Add a line to separate above group
        cmbControl.Caption = "List Form Name"        ' Add label the user will see
        'cmbControl.FaceId = 2952        ' Add label the user will see
        cmbControl.OnAction = "TestingFormName" ' Add the name of a function to call
       
       
       
        Set cmbControl = .Controls.Add(msoControlButton, 12329, , , True) ' ViewsDatasheetView
        Set cmbControl = .Controls.Add(msoControlButton, 5814, , , True) ' ViewsPivotTableView
        Set cmbControl = .Controls.Add(msoControlButton, 5815, , , True) ' ViewsPivotChartView
        Set cmbControl = .Controls.Add(msoControlButton, 21, , , True) ' Cut
        Set cmbControl = .Controls.Add(msoControlButton, 19, , , True) ' Copy
        Set cmbControl = .Controls.Add(msoControlButton, 22, , , True) ' Paste
        Set cmbControl = .Controls.Add(msoControlButton, 222, , , True) ' PropertySheet
        Set cmbControl = .Controls.Add(msoControlButton, 14782, , , True) ' close

End With

    Set cmbControl = Nothing
    Set cmbRightClick = Nothing
       
End Sub

Customize right click menu

Hello all

hello all nice to meet u
iam haytham from egypt
Hello all

Knock You Up

vendredi 1 mai 2015

Years ago I rented an auto body shop to a distinctly different couple. He was as German as you get. His name was Hans and a long German last name. I forgot her name but she was as British as anything I had seen at least in the US. The first time I heard her say “I’ll knock you up at 6” I just about wet my draws. What brought this to my memory is that a couple of nights ago I was reading a short article and it said the saying came about was that before there were alarm clocks that there were people in London that earned their living by going around and knocking on peoples window when it was time for them to go to work. Anybody know if its truth or fiction? Sounds logical to me, but again so does Access<G>
Knock You Up

Hello

I have been using Access for several years, off and on, from Access 97 through to 2010. I only spend a small part of my time programming, so I have fairly limited skills, and always think 'There mus be a better/more efficient way to do this'

I have lurked here for a while, and found a lot of help.

Peter
Hello

Hello

I have been using Access for several years, off and on, from Access 97 through to 2010. I only spend a small part of my time programming, so I have fairly limited skills, and always think 'There mus be a better/more efficient way to do this'

I have lurked here for a while, and found a lot of help.

Peter
Hello

create table based on textbox

I have a userform that has 4 textboxes and a command button.

The user types in box1 a Rack, in box2 a shelf, in box3 a place and in box4 a shelf.

The user types in Rack textbox 18
The user types in Bay textbox 4
The user types in Shelf textbox 2
The user types in Place textbox 3

I then would like to create that amount of records in a new Temp table.

The attached file shows what the results of the output should be.

Attached Files
File Type: xls Location Test.xls (17.5 KB)
create table based on textbox

Access Export issue

When exporting a table from Access as a text file, it keeps adding .00 to the end of the number format records that I am tying to export.

Does anyone know why it is doing that and what I need to do to prevent that from happening?
Access Export issue

Labels