Hello. I have a form with combo boxes that have VBA Enter events. These events log the RowSource values when the combo boxes are “entered”. This works for the first three combo boxes, but not the last two. The exact same logic is applied to all five combo boxes, and the last four combo box RowSource values are set using the AfterUpdate events of each previous combo box.<\/p>\n
This one works perfectly (RowSource never changes; set during form design):<\/p>\n
Private Sub cboFamily_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboFamily_Designator] RowSource = \" & Me.cboFamily_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\n
Advertisement
This one works perfectly (RowSource changes during AfterUpdate event of ‘cboFamily_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboSystem_Designator.RowSource = \"qsrcSystems_Family\"\n<\/code><\/pre>\nPrivate Sub cboSystem_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboSystem_Designator] RowSource = \" & Me.cboSystem_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one works perfectly (RowSource changes during AfterUpdate event of ‘cboSystem_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboConfiguration_Designator.RowSource = \"qsrcConfigurations_System\"\n<\/code><\/pre>\nPrivate Sub cboConfiguration_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboConfiguration_Designator] RowSource = \" & Me.cboConfiguration_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one does not work (RowSource value from ‘Me.cboComponent_Designator’ missing; changes during AfterUpdate event of ‘cboConfiguration_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboComponent_Designator.RowSource = \"qsrcComponents_Configuration\"\n<\/code><\/pre>\nPrivate Sub cboComponent_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboComponent_Designator] RowSource = \" & Me.cboComponent_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one does not work (RowSource value from ‘Me.cboSubComponent_Designator’ missing; changes during AfterUpdate event of ‘cboComponent_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboSubComponent_Designator.RowSource = \"qsrcSubComponents_Component\"\n<\/code><\/pre>\nPrivate Sub cboSubComponent_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboSubComponent_Designator] RowSource = \" & Me.cboSubComponent_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nWhat could be the reason(s) for the last two Enter events not producing the same results as the first three?<\/p>","upvoteCount":2,"answerCount":10,"datePublished":"2023-12-15T14:38:10.000Z","author":{"@type":"Person","name":"donaldfisher3","url":"https://community.spiceworks.com/u/donaldfisher3"},"acceptedAnswer":{"@type":"Answer","text":"
My apologies. The view of the data in which I observed the missing values did not contain all of the offending field’s text. It has been there the whole time; I just couldn’t see it.<\/p>","upvoteCount":0,"datePublished":"2023-12-15T17:54:09.000Z","url":"https://community.spiceworks.com/t/missing-rowsource-value/964028/9","author":{"@type":"Person","name":"donaldfisher3","url":"https://community.spiceworks.com/u/donaldfisher3"}},"suggestedAnswer":[{"@type":"Answer","text":"
Hello. I have a form with combo boxes that have VBA Enter events. These events log the RowSource values when the combo boxes are “entered”. This works for the first three combo boxes, but not the last two. The exact same logic is applied to all five combo boxes, and the last four combo box RowSource values are set using the AfterUpdate events of each previous combo box.<\/p>\n
This one works perfectly (RowSource never changes; set during form design):<\/p>\n
Private Sub cboFamily_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboFamily_Designator] RowSource = \" & Me.cboFamily_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one works perfectly (RowSource changes during AfterUpdate event of ‘cboFamily_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboSystem_Designator.RowSource = \"qsrcSystems_Family\"\n<\/code><\/pre>\nPrivate Sub cboSystem_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboSystem_Designator] RowSource = \" & Me.cboSystem_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one works perfectly (RowSource changes during AfterUpdate event of ‘cboSystem_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboConfiguration_Designator.RowSource = \"qsrcConfigurations_System\"\n<\/code><\/pre>\nPrivate Sub cboConfiguration_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboConfiguration_Designator] RowSource = \" & Me.cboConfiguration_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one does not work (RowSource value from ‘Me.cboComponent_Designator’ missing; changes during AfterUpdate event of ‘cboConfiguration_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboComponent_Designator.RowSource = \"qsrcComponents_Configuration\"\n<\/code><\/pre>\nPrivate Sub cboComponent_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboComponent_Designator] RowSource = \" & Me.cboComponent_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nThis one does not work (RowSource value from ‘Me.cboSubComponent_Designator’ missing; changes during AfterUpdate event of ‘cboComponent_Designator’):<\/p>\n
Changed using:<\/p>\n
Me.cboSubComponent_Designator.RowSource = \"qsrcSubComponents_Component\"\n<\/code><\/pre>\nPrivate Sub cboSubComponent_Designator_Enter()\n 'FETCH DEBUG MODE OPTION FROM tblAdminOptions\n blnDebugMode = DLookup(\"[Debug_Mode]\", \"tblAdminOptions\")\n If blnDebugMode = True Then\n 'ADD AN EVENT LOG ENTRY\n strEventLogObjectName = Me.Name\n strEventLogEntryText = \"Control [cboSubComponent_Designator] RowSource = \" & Me.cboSubComponent_Designator.RowSource\n Call Event_Log_Entry(strEventLogComputerName, strEventLogUserName, strEventLogObjectName, strEventLogEntryText)\n Else\n 'NOTHING SPECIFIC TO DO HERE\n End If\nEnd Sub\n<\/code><\/pre>\nWhat could be the reason(s) for the last two Enter events not producing the same results as the first three?<\/p>","upvoteCount":2,"datePublished":"2023-12-15T14:38:10.000Z","url":"https://community.spiceworks.com/t/missing-rowsource-value/964028/1","author":{"@type":"Person","name":"donaldfisher3","url":"https://community.spiceworks.com/u/donaldfisher3"}},{"@type":"Answer","text":"
Additionally, placing a Debug.Print or MsgBox at the top of the offending Enter events result in positive results (RowSource values displayed as expected).<\/p>","upvoteCount":0,"datePublished":"2023-12-15T14:41:34.000Z","url":"https://community.spiceworks.com/t/missing-rowsource-value/964028/2","author":{"@type":"Person","name":"donaldfisher3","url":"https://community.spiceworks.com/u/donaldfisher3"}},{"@type":"Answer","text":"