In a form or report, I want to right-click and read the data the cursor was pointing to. So I can bring up a form to edit that data and associated data. Any ideas how I can do that?
Tom Budlong
TomBudlong@Bigfoot.com
I have just had a look in access 97 & access 2000, & neither of them appear to have a built in facility for right-clicking on an object. But I would imagine you could manually set one. However, I don't think this would be very easy, because you would have to intercept the command from windows & manipulate. Somebody posted a vaguely similar question about disabling the mouse wheel quite recently. I think that contained the information on how to disable that, so you might well be able to modify that to do what you want. James Goodman
j.goodman00@btinternet.com
Actually, either left- or right-click is OK. This would be clicking on a data item shown by a bound text box in the detail section of a report. If I know what data is under the cursor then I can show that data and associated data in an editing screen. So far I can find no way for Access to tell me where the cursor is.
Perhaps someone has made an ActiveX control to do this?
Tom Budlong
TomBudlong@Bigfoot.com
Create a form to Open in Dialog Mode to do the editing.
Use the Public Variable to enter the data into the textbox on the form you do the editing (during the Form's Open event)
Add command buttons on the form to Save the Data and Close the form, or to Not Save the Data and Close the form.
Private Sub Form_Open(Cancel As Integer)
TextBoxName = strEditText
End Sub
Private Sub cmdSaveAndExit_Click()
strEditText = TextBoxName
DoCmd.Close acForm, "FormNameGoesHere"
End Sub
Private Sub cmdDoNotSaveAndExit_Click()
DoCmd.Close acForm, "FormNameGoesHere"
End Sub
Then in the textbox's Click Event on the form where you capture the original data, add
Private Sub TextBoxNameGoesHere_Click()
strEditText = TextBoxNameGoesHere
DoCmd.OpenForm "FormNameGoesHere", , , , , acDialog
TextBoxNameGoesHere = strEditText
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.