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 Replies
ADVERTISEMENT
Jul 23, 2013
I'm using this control to allow users to select a date as input to a subform. The control is working just fine, but I have a problem, I need to reset the value to today on certain events (for instance a reset button to reset the values back to today). I have tried:
Me!calThru.Today
and
Me.calThru.Value = Date
and
calThru.Value = Date
but with no success.
View 4 Replies
View Related
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 2 Replies
View Related
Apr 20, 2015
I want to call the "On Current" event of another form.
I have a parent(mainform) form and then I have a subform(CurrentForm) and in that subform(CurrentForm) I have another subform(mysubtab01). From the mySubTab01, I want to call the On Current of the parent form. How can i do this?
This is an example of how I am setting the record source of the deepest subform where I want to call the parent on current from:
Forms(mainform)(CurrentForm)(mySubTab01).Form.Reco rdSource = "Select * from subQrytab03"
View 12 Replies
View Related
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
Aug 23, 2013
I have a form with a tab control and an option group (frame). When I built the layout of the contents of the first tab, the frame responded properly to click events. Now that I have copied them onto the tab control, the events seem to disappear.
(When I check the events for the controls, they are all still there, and selected by the Properties table).
I know it's probably one of the "doesn't use Access very much, does he" type of situations, so how to get these controls working again!
Here is the Form Code listing.
Option Compare Database
Option Explicit
Sub SetSourceDescription()
If Me.frRunMode.Value = 0 Then
Me.lblSourceType.Caption = "Source for this run will be the Extract .pst file(s)"
[Code]...
View 3 Replies
View Related
Dec 2, 2014
So Access was unable to manage the amount of content that I needed to produce in a single report. The reports contain 12 charts/graphs all of which I needed on separate pages (one chart per page). As such I could not create large enough charts in access to fit to each page, as Access limits the amount of space one can use in a report.
I downloaded Microsoft Reports Builder 3.0 and built my reports as needed and can generate them as desired at current. I'm wondering if there a way to call that RDL file I created to generate my reports from a form control button in Access?
View 3 Replies
View Related
Sep 27, 2006
I have a main form with a subform. I need to update values in the subform when a field on the main form is updated using afterupdate on that control.
Example:
main form name: mainform
control name: gst (on main form)
subform name: subform
records displayed as datasheet.
records field to update: retail
In main form gst control afterupdate event:
Me.[subform].[Form].retail_afterUpdate
Hoping to call the afterUpdate procedure on the retail field.
Error message:
Method or data member not found.
View 2 Replies
View Related
Jun 24, 2013
I need to create a form to input records (or modify records) however im unaware of the methods that could be used to actually put the data into the tables..my current method is using:
Code:
Dim dbs as DAO.Database
Set dbs As CurrentDB
Dim InsertSQL As String
InsertSQL = "INSERT INTO [Table] (Columns) VALUES (Values)"
dbs.Execute InsertSQL
I am not sure if this is the most effecient or best or if it has issues that other methods or ways to use but doing this seems to do the trick.
View 3 Replies
View Related
Nov 17, 2014
I am dynamically trying to set a control default value. I have the code below in the On Load event of the form. I get an error msg that says "Run-time error '2467': The expression you entered refers to an object that is closed or doesn't exist."
Forms(mainform)("Dyn_" & Trim(str(Project_ID)) & "_SubFrmTab03" & PT_Suffix & "_Approval").Controls("Groupid").DefaultValue = "=Forms!" & mainform & ".ClaimInfoGroupID"
View 3 Replies
View Related
May 27, 2014
Visual Studio IDE environment and I have been working with Access VBA for almost a year now.
I am very used to generating my form controls in runtime and being able to create some cool user interface interactions by being able to say btnExample.OnClick += MyDynamicClickFunction
MyDynamicClickFunction(Object sender, EventArgs e).... code
Any way to assign functions to the events of already made controls on a form. Probably during the load event?
Now I have found that there are many ways to replicate Visual Studio's features by accessing User32 and replicating them
View 2 Replies
View Related
Feb 4, 2015
I am updating a value in an unbound control on an unbound form. When the value in the control is changed I want a sequence of code to execute. Specifically changing the record source of a subform and refreshing it.
The problem I have is that when the value of the unbound text box is control is changed (I am using a button to change the value as a test) the after update event on the text box does not do anything.
I did a simple test using a button to change the value in the text box and in the afterupdate event of the text box asked it to output the value of the textbox to a message box as shown below.
The problem is this does not work, nothing happens. If I tab out of the text box or change the value with the keyboard however the msgbox appears. Just not via a vba change.
Code:
Private Sub Prod_ID_AfterUpdate()
Dim pid As String
pid = Me.Prod_ID
MsgBox pid
End Sub
Private Sub Button_Test_Click()
Me.Prod_ID.SetFocus
Me.Prod_ID = "TEST"
End Sub
View 7 Replies
View Related
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
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
Dec 15, 2014
I have a report, on a control tab, on a main form.
On the form are two buttons: one to show all items, and one to filter them based on a boolean field called showitem.
The buttons work with the code below.
What I want to do but cannot seem to figure out is to have the report default to no filter.
The bound query has no criteria.
I'm trying to set the filter property via the on open or on load event and even if I isolate the report, cannot seem to reach it.
Code:
Private Sub b_hide_items_Click()
Me.Profile_Timeline_wNotes_subreport.Report.Filter = "timeline.showItem <> 1"
Me.Profile_Timeline_wNotes_subreport.Report.FilterOn = True
Me.Profile_Timeline_wNotes_subreport.Requery
End Sub
Private Sub b_show_all_Click()
Me.Profile_Timeline_wNotes_subreport.Report.Filter = "timeline.showItem = 0"
Me.Profile_Timeline_wNotes_subreport.Report.FilterOn = False
Me.Profile_Timeline_wNotes_subreport.Requery
End Sub
View 14 Replies
View Related
Feb 15, 2006
Is just me, or are all of the events on tab control tabs disabled?
View 3 Replies
View Related
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
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
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
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
Aug 15, 2005
I have a form with a number of controls with code behind - this works as required.
However, recently I decided to use a tabbed control to hold the controls and simply cut/pasted these control onto one of the pages of the tab control. The events now no longer fire as they did and I have no functionality on the form - the code still exists in the design of the form though..... any ideas?
View 1 Replies
View Related
Jul 24, 2013
I have a report that tracks scores for our employees. From the report, you can click a button to add a new score in a form or edit an existing score(frmscoretracker). On this form there are two subforms, in a tabbed control to track additional information about the score; what areas were marked down(Trends), and was it a failing score(AutoFail).
When this form opens I have it programmed to only show the subform if there is data in it. The goal being, if I am adding a new score and there is no existing trends or Autofails for this new record, neither subforms will show - I will add an after update even to show either trends or autofail depending on the score recorded. Also, if someone chooses to edit the score, whatever subform with data, will show as well.
When someone clicks to add a new score, opening this main form to a new record, both of the tabs show. However, if the form opens to an existing record, the appropriate tab shows. Here is the code
Code:
Private Sub Form_Open(Cancel As Integer)
'If the subform has a record, the tab is visible, if not, the tab is not visible
If Me.frmtrends.Form.Recordset.RecordCount > 0 Or IsNull(Me.Trends) Then
Me.Trends.Visible = True
Me.TabCtl33.Visible = True
Else
Me.Trends.Visible = False
End If
[code]...
Both tabs are set as not visible in the default settings. Is there something in this code that is triggering then to be visible when there is no record in the main form?
View 4 Replies
View Related
Oct 29, 2013
I have some code for a button on click event to open a form and select the record which corresponds to a value in an unbound text box. The code is:
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmOpenPatientRecord"
[Code] ....
This works fine when I put in a 10 digit NHS number but opens a blank record when I enter a four digit or six character/digit PatientNumber. Both patient number and NHS number are text fields in the underlying table.
View 14 Replies
View Related
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
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
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