Custom Right Click Menu

NearImpossible

Registered User.
Local time
Yesterday, 20:00
Joined
Jul 12, 2019
Messages
225
I am using the full version of access to create my database, however the end users only have the Access Run-Time so there is no Right Clicking.

I followed the steps shown here, however whenever I right click, I don't get the menu.

I set it on the Form Properties > Other Tab

For my commands i'm using "Copy" and "Paste" however they both have an exclamation next to them and when I mouse over, it says Unsafe Action.

I've set the database to be Trusted as well as turned on Enable All Macros, but still no luck.

Any Thoughts
 
Hi. I have followed the same instructions before but don't remember running into any problems.
 
Hi. Check out this other thread where I posted the same link and also uploaded a demo file using it. Hope it helps...
 
Could you post that zip file here? Its telling me I need an account to download it.

Here are the screen shots of the macros and form properties, I just used the same names as the tutorial for the macros
 

Attachments

  • Form Properties.PNG
    Form Properties.PNG
    10.1 KB · Views: 216
  • mcrAddShortcutMenu.PNG
    mcrAddShortcutMenu.PNG
    3.7 KB · Views: 219
  • mcrShortcutMenuCommands.PNG
    mcrShortcutMenuCommands.PNG
    5.6 KB · Views: 233
Last edited:
I put the macro in the wrong spot on the properties :banghead:, its working on the form, however if I add it to a text box, I get the regular Right Click menu.

Ill check out your demo


EDIT: I added it to the subform containing the text box and it works.

Think its time for bed......
 
EDIT: I put the macro in the wrong spot on the properties :banghead:, its working on the form, however if I add it to a text box, I get the regular Right Click menu.

Ill check out your demo
Well, it's just a small demo. I'm not sure it will cover what you want, but let me know either way.
 
LOL. I couldn't wait, so I added a Textbox to my demo, and it still worked. Hope it works for you too. Cheers!
 
Revisiting this thread as I am running into another issue.

What I would like to do is give the user the ability to insert a row with the right click menu, which I added that command, however whenever I right click and select it, I get the following error message

The command or action "Insert Rows" isn't available now

Data Entry and Allow Additions are both set to Yes

any thoughts ??
 
Revisiting this thread as I am running into another issue.

What I would like to do is give the user the ability to insert a row with the right click menu, which I added that command, however whenever I right click and select it, I get the following error message

The command or action "Insert Rows" isn't available now

Data Entry and Allow Additions are both set to Yes

any thoughts ??
I may have to see exactly what you added. Can you post a demo?
 
See Attached
Ah, looks like you may be using the wrong command. I think that one is for inserting a new criteria row in the query grid. If you want to navigate the form to a new record, then try using GotoRecord.
 
Ah, looks like you may be using the wrong command. I think that one is for inserting a new criteria row in the query grid. If you want to navigate the form to a new record, then try using GotoRecord.


This particular table is the contacts table [Title] [Name] [WorkPhone] [CellPhone]

and what I was hoping to accomplish was give the user the ability to insert a new row in the middle of existing rows to keep everyone with the same title grouped together.

No biggie, i'll just order them by the Title whenever the form is opened and all will be good.

So the Title is a dropdown menu, is it possible to sort by the 2nd column, because i'm not having any luck with the following set in the forms order by field

Title.Column(1)


Thanks again for your vast knowledge and willingness to assist, i'm learning new things every day !!
 
Last edited:
This particular table is the contacts table [Title] [Name] [WorkPhone] [CellPhone]

and what I was hoping to accomplish was give the user the ability to insert a new row in the middle of existing rows to keep everyone with the same title grouped together.

No biggie, i'll just order them by the Title whenever the form is opened and all will be good.

So the Title is a dropdown menu, is it possible to sort by the 2nd column, because i'm not having any luck with the following set in the forms order by field

Title.Column(1)


Thanks again for your vast knowledge and willingness to assist, i'm learning new things every day !![/QUOTE]
To sort a dropdown, you would do it in the Row Source property. For instance:


SELECT ID, Field1, Field2 FROM Table ORDER BY Field2
 
To sort a dropdown, you would do it in the Row Source property. For instance:


SELECT ID, Field1, Field2 FROM Table ORDER BY Field2


I'm not trying to sort the dropdown menu, i'm trying to sort the table by the selected value of the dropdown menu, see attached sample.

I would like to sort the table based on the TitleID of the Title Dropdown
 

Attachments

I'm not trying to sort the dropdown menu, i'm trying to sort the table by the selected value of the dropdown menu, see attached sample.

I would like to sort the table based on the TitleID of the Title Dropdown
Hi. I don't quite understand. The db you posted only has one form in it, and it is bound to a table. If I make any selection in the combobox, I will be updating that record. Also, there are no code in the db for me to could get an idea of what you're trying to do. To sort the records on a form, you would use the OrderBy property. For example:
Code:
Me.OrderBy = "FieldName"
Me.OrderByOn = True
 
Hi. I don't quite understand. The db you posted only has one form in it, and it is bound to a table. If I make any selection in the combobox, I will be updating that record. Also, there are no code in the db for me to could get an idea of what you're trying to do. To sort the records on a form, you would use the OrderBy property. For example:
Code:
Me.OrderBy = "FieldName"
Me.OrderByOn = True

This I know, If I enter [ContactTitle] in the OrderBy property, it sorts them alphabetically. Would I would like it to sort by is the TitleID of the associated title so instead of sorting the table as

Capt
Capt
Dep
Lt
Lt
Sgt

it would sort it based on their ID from the titles table and would look like

Capt
Capt
Lt
Lt
Sgt
Dep
 
If I understand you correctly, change the form's recordsource to
Code:
SELECT Contacts.*
FROM Contacts INNER JOIN Titles ON Contacts.ContactTitle = Titles.Title
ORDER BY Titles.TitleID;
 

Users who are viewing this thread

Back
Top Bottom