Custom Right Click Menu (1 Viewer)

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
Hi. I have followed the same instructions before but don't remember running into any problems.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
Hi. Check out this other thread where I posted the same link and also uploaded a demo file using it. Hope it helps...
 

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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......
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
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.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
LOL. I couldn't wait, so I added a Textbox to my demo, and it still worked. Hope it works for you too. Cheers!
 

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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 ??
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
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?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
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.
 

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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:

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
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
 

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 18:32
Joined
Oct 29, 2018
Messages
11,090
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
 

NearImpossible

Registered User.
Local time
Yesterday, 20:32
Joined
Jul 12, 2019
Messages
186
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
 

isladogs

CID
Local time
Today, 02:32
Joined
Jan 14, 2017
Messages
13,602
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 (Users: 0, Guests: 1)

Top Bottom