Change The Built-in Right-click Event Of An ActiveX Control

Mar 13, 2008

I am using an active x control that when you right click on it, it automatically pops up an "About" box showing information about the control. I wouldn't object to this, but I need to use the right mouse down event for another purpose in my program. So far I have discovered that the code I put in the the event works, but only after the "About" box pops up. Is there anyway to cancel or prevent the popup? The reason that I need the right mouse down event is because is that I am already using the left mouse double click event, and I can't use the left mouse down event because then it always fires before the left mouse double click event. This control doesn't have any single click events. Ideas?

View Replies


ADVERTISEMENT

Change Backcolor Of 'built' Control Number

Dec 20, 2005

I have a randomized table named tblRandomBoxes with the following data:

ID RandomID
1 4
2 5
3 2
4 6
5 1
6 3

I have 6 command buttons named command1,command2,command3, etc. and 6 Labels named Label1,Label2, Label3, etc. On Click of each command button, I want to lookup the ID based on the RandomID and set the backcolor of that label number to a different color.

ie) on command1 click me.Label4.backcolor = 39835

How can I 'build' the label number with the lookup? Here's the code I'm trying, but it doesn't recognize my 'built' label number:


Private Sub command1_Click()
Dim ctl As Control
ctl = "Label" & DLookup("ID", "tblRandomBoxes", "RandomID = 1")
Me.ctl.BackColor = 39835
End Sub

Thanks,

Sup

View 6 Replies View Related

Modules & VBA :: ActiveX Control Events Aren't Raised While Calling Its Methods From The Open Event

Oct 9, 2013

We have an ActiveX grid control, 10Tec iGrid, written in VB6. One of its method, Group, used to group rows, raises the AfterAutoGroupRowCreated event so the developer can adjust the look and contents of every group row created during the automatic process of grouping.

When our ActiveX grid is hosted on an MS Access form and we call the Group method while populating the grid in the form's Open event, the AfterAutoGroupRowCreated event isn't triggered. But this event definitely works as expected in other development environments, and even in MS Access if we call Group from the form's Load event.

Is it a well know issue of MS Access, when any events of ActiveX controls aren't triggered while "executing" the Open event

View 1 Replies View Related

Forms :: Date Control On Click Event

Sep 19, 2013

I have a date control and on the Click event I run the following code. Trouble is the Date Control stops working, ie you can't change the date after one click ?

CODE.

Private Sub Calendar7_Click()
weekofyeartxt.Value = DatePart("ww", Calendar7.Value)
End Sub

View 3 Replies View Related

Forms :: Change Background Color Double Click Event?

Jul 13, 2015

I am using a continuous form and would like my users to be able to change a field background color to a light red by double-clicking. The user would also be able to change it back to white by double-clicking again.

The code I am using (below) changes the field background color for all records. I need my code to only change the field color of the current record and cannot seem to find how to do that. The field name is [System_CurrentStatus].

Private Sub System_CurrentStatus_DblClick(Cancel As Integer)
If Me.System_CurrentStatus.Backcolor = vbWhite Then
Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160)
ElseIf Me.System_CurrentStatus.Backcolor = RGB(234, 154, 160) Then
Me.System_CurrentStatus.Backcolor = vbwhite
End If
End Sub

View 13 Replies View Related

ActiveX Control

Feb 4, 2008

Hi All!

I'm new to ms access 2007.
How can I register my ocx files? like comdlg32.ocx?
Please help! My .mde file is running but somehow some of the features are not running.

View 1 Replies View Related

How To Register ActiveX Control

Jun 10, 2014

I'm using an activeX control and access gave me an error message showing that "I must register the ActixeX control. how can i do this?

View 6 Replies View Related

Run A Activex Control From A Command Button

Mar 4, 2008

Hi all,

I am wandering if someone can help me out on this i have a thermal printer with it you get some ative x components to control the printer like for example what i am tryin to do is kick the cashdrawer which is connected to the printer,
Now the activex button does work correctly when click but i have another command button which prints out a couple of pages odf information so what i am tryin to do is have abother cmmand button when clicked run the code and then calls or runs the active x button to open the drawer is there a way i can do is i tried using the call statement with the name of the activex but with no luck.

i would really appreciate it if someone can help me out on this. thanks.

Regards
Naym

View 1 Replies View Related

Free Datepicker Activex Control

May 14, 2005

Hi,

While searching for a free datepicker activex control I found the following control. It also allows null value. I found it quite useful and it's free

http://spazioinwind.libero.it/vbprogzone/activex/downloads/cal2.zip

regards

edit: copy the shortcut on a new browser otherwise it gives an error

View 1 Replies View Related

ActiveX Control Problem In FORMS

Jan 4, 2006

Whenever i try to add an ActiveX control in my any form i recieve following Error Message ( See Attachment ), any help will be Appreciated

Take Care
ENJOY

View 4 Replies View Related

Media Player ActiveX Control

Jun 18, 2006

Hi,

I have a form with an ActiveX Control for Media Player 10. The player works ok, but if I try to close the form using the PlayStateChange Event, Access crashes out to the 'Send Report To Microsoft' window.

This is the code:-

Private Sub WindowsMediaPlayer0_PlayStateChange(ByVal Newstate As Long)

If Newstate = 8 Then

DoCmd.Close

End If
End Sub

This is looking for the end of the current media file, but I get the same problem if I look for Newstate = 1, the stop button being pressed.

However, if I put the DoCmd.Close command behind a command button, the form closes as normal.

Any ideas?

View 3 Replies View Related

Error: Communicating With OLE Server Or ActiveX Control

Nov 18, 2006

I just installed Office 2007 and I get this error whenever I start MS Access 2007.
"A problem occured while Microsoft Office Access was communicating with the OLE server or ActiveX Control"

What could it be? I don't have any antivirus appz or such that could interfere, and my Windows XP+SP2 is updated daily.

View 12 Replies View Related

Modules & VBA :: Referencing ActiveX Control In A Class

Jun 26, 2015

I'm using Access 2003. In "References" (Tools > References > Browse...), I've added in "Microsoft Windows Common Controls 6.0 (SP6)" (c:windowssystem32mscomctl.ocx).

I've then created/inserted an instance of the control "Microsoft ListView Control 6.0 (SP6)" on a Form ("MyForm") and given the listvew control the Name "MyListView".I wanted to decorate MyListView with some custom methods so I've created a new class module ("DecoratedListView") which contains a member field called "lvw".

I want 'lvw' to point/reference to MyListView, but I don't know what reference type to use in its declaration. Importantly, I also want to capture lvw's ColumnClick event.

I've tried:

Code:
Public WithEvents lvw As Object
Public WithEvents lvw As Control
Public WithEvents lvw As MSComctlLib.ListView.2
Public WithEvents lvw As MSComctlLib.ListView
Public WithEvents lvw As CustomControl

and none works when I

Code:
set lvw = Forms!MyForm.MyListView

The first try (Object) doesn't even compile. I get the exception "Expected: identifier"
The second try (Control) doesn't compile either. I get the exception "Object does not source automation events"
The third try (MSComctlLib.ListView.2) doesn't compile and throws the exception "Expected: end of statement"
The fourth try (MSComctlLib.ListView) compiles but fails at runtime with the exception "Type mismatch". Using TYPENAME() on the control returns "CustomControl".
The fifth try (CustomControl) compiles but fails at runtime with the exception "Object or class does not support the set of events".

I can't believe I'm the first person to have tried to capture an ActiveX Control's events in a separate class.

View 1 Replies View Related

Distributing A Database That Uses The Month View ActiveX Control

Oct 26, 2004

Hello all,

This problem has been causing to pull my hair out all morning, so any help would be most welcome.

The business I work for hired a contractor to produce a database, he did a great job and it looks very professional, but he used an ActiveX control to display four months at once, it is a fairly common control but it seems it is not included in the Image for the workstations here (it will be soon).

The OLE class is called MSComCtl2.MonthView.2 and I remembered using the date time picker control (MSComCtl2.DTPicker.2) and I figured that it would make sense if it was in the same ActiveX control, so I registered Mscomct2.ocx and yes, it does contain the right class... but it still didn't work. I found a second control package which also included the class, comct232.ocx (older but it should work) and finally, both of them together do work... for all but one user. It isn't the workstation, anyone else logging into that workstation has no problems.

The problem cropping up is the "control has no object" error and it suggests that I unregister then re-register the OLE server (which is another word for the .ocx files for those not in the know) which I did, and it complains about a missing reference to C:WINNTsystem32Mscomct2.ocx if you look at the references in the VBE editor which makes very little sense to me.

The users do not have admin rights to there computers, but I'm thinking of temporarily adding the user to the admin group (on her computer only obviously) and un-registering then re-registering the control there. That seens abit extreme, and it should just work!

This is driving me nuts, anyone know what I'm missing here?

Thanks in advance

-mwalts

View 6 Replies View Related

Reports :: Insert A Barcode ActiveX Control / But It Is Not Listed

May 30, 2014

I am wanting to insert a Barcode ActiveX control, but it is not listed. In an instruction video, after clicking on ActiveX Controls, the one named "ABarcode ActiveX" is at the top of the list.=how I can obtain this.

View 2 Replies View Related

Control Treeview Is Missing Form ActiveX List?

Jun 21, 2014

I use Access 2010 on Windows 7 64b to create a form with a Treeview control. However, this control is missing from the list of controls activix. How can I add?

View 4 Replies View Related

Calender ActiveX Control Display Also Hours, Minutes And Seconds

Jul 22, 2007

I am using the calender control 11.0. By this calender I can only set the date year, month and day. I can not set the clock time:Hours, minutes and seconds. Is there a calender that enables me to set the date in the format:dd-mm-yyyy HH:MM:SS, means day,month,year Hour:Minutes:Seconds.


Grateful

View 1 Replies View Related

General :: Access 2010 - Printing ActiveX Control / Cropped To Top Left Corner

Oct 22, 2014

I have a form and report created in Access 2010 that contain an ActiveX Control.

When the form or report is printed the ActiveX Control appears but is cropped up to the top left corner.

View 5 Replies View Related

Click Event

Jun 7, 2006

I'm working with a database with employess info in access, When I click on an employees name in a form, I want to fire off another form with there info, what I have now it does nothing.

View 4 Replies View Related

Is There A Right-click Event ?

Mar 30, 2006

I have a list box control on a form and i'd like to set up a right-click property. Can this be done at all? When I open the Events tab on the property window..there is no right-click property :confused:

Thanks!

View 4 Replies View Related

Disabled A Click Event

Dec 15, 2005

Hello,

How can you disabled a click event on a text box ? I don't want to use ENABLE = false because the background of the texte box comes gray. So, any alternative solution?

Thanks,

Le

View 6 Replies View Related

Subform Click Event

Mar 16, 2006

I'm trying to code an event that would occur when a user double-clicks on the Record Selector of a subform. I want it to then open a form that would provide additional details about the record selected in the subform. I can't find documentation to tell me (1) where to put the code, i.e. subform double-click event vs. subform detail double-click event, etc.; (2) how to reference the record id of the selected record for use in the filter for the form that is going to be opened (the underlying query contains the ID for the record). Can anyone help or point me to documentation?

View 2 Replies View Related

Double Click Event

Jan 17, 2005

Hi,

I have a form which has a tab control on it. The form itself is based on 1 table (tblCustomers). The tab control has 2 pages.

Page 1 shows 6 fields from tblCustomers.

Page 2 of the tab control shows 2 embdedded forms. Those forms are based on queries created from tblCustomers. one shows records with a date entered into one of the fields, the other shows records that have no dates.

What I want to be able to do is when I see a company name in one of the ebedded forms (Page 2), I want to be able to double click that record and it switches me back to Page 1 and shows the the related details of whichever company I double clicked.

I have changed the double click event in the emdedded form and using the builder to create something. I also added a setfocus command as I read about that somewhere (but i have no idea what it does). Through this I managed to get it to switch from Page 2 to Page 1 when I double click, but it only ever takes me to record 1 regardless of which company i double clicked.

i may have this deisgned totally wrong so please feel free to point me in the right direction.

any ideas?

thanks in advance

View 1 Replies View Related

Click Event Not Working

Feb 2, 2005

I'm calling a Public Click event on a Form, from a Delete Record button on another form. Debugging shows that the code executes correctly line for line... but the 'Event' doesn't function as it should. The main feature I need to to iterate over the controls on the second form to disable them, to prevent users from typing in, causing relationship error. Why is this?! Even after the execution of the code... I can click on the refresh button myself, which will disable the control, but not if I call the event from the code.

Here is my code...

Code: Private Sub DelGroup_Click()On Error GoTo Err_DelGroup_ClickDoCmd.SetWarnings FalseDim msgString As StringmsgString = "You are about to delete a Lessee/Group." & Chr(13) & "This will also remove all related records in the..." _& Chr(13) & Chr(13) & Chr(45) & " Reviews Tab" & Chr(13) & Chr(45) & " Facility Details Tab" & Chr(13) & Chr(45) _& " Chronology Tab" & Chr(13) & Chr(45) & " Asset and Insurance Tabs." _& Chr(13) & Chr(13) & "Are You Sure?"If MsgBox(msgString, vbInformation + 4, "Confirm Delete") = vbYes Then DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70Dim frm As Form_ReviewsSet frm = Forms!Reviewsfrm.SelectLessee.Requeryfrm.SelectLessee.Value = ""frm.SelectAsset.Requeryfrm.SelectAsset.Value = ""DoCmd.SelectObject acForm, "Reviews", False 'Don't even think i need this line, but put it in for good measure. Tried withoutfrm.Refresh_Click 'It now jumps to the Refresh Click Event and runs as expected...ElseExit SubEnd IfDoCmd.SetWarnings TrueExit_DelGroup_Click:Exit Sub Err_DelGroup_Click:MsgBox Err.DescriptionResume Exit_DelGroup_ClickEnd Sub

This is driving me mad

View 2 Replies View Related

List Box Double Click Event Please Help

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

Forms :: Run 2 Queries On On Click Event

May 1, 2015

I have a form with a combo box that is populated by (1) a union query, and (2) a make table query from that union query. The reason I have both is because I want to have an autonumber and I can't do that directly in the first query.

So any time I update any of the tables that are in the union query, then go back to the form, i want the the combo box to update the list which means I have to run (1) and then (2) to repopulate the combo box with the updates.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved