E
eschloss
Work - 2003 SP? with WinXP
Home - 2003 SP3 with Vista
Parent Form - frmMain
Parent Form Subform container - Main_Subform
Form - frmSchedules
Form Subform container - Schedules_Subform
Subform - frmSchedules_Add/Edit
When I click the Add_Edit_Label on my Form, the code goes to the AfterUpdate
event for a combobox control on my Subform. The last parameter in this event
code is where Vista throws up the following error:
Run-time error '3000':
Reserved error (-1038); there is no message for this error.
Does anyone know what is happening here?
Code behind my Form:
**********************************************************
Private Sub Add_Edit_Label_Click()
Me!Schedules_Subform.SourceObject = "frmSchedules_Add/Edit"
If IsNull(Me!Current_Name_Text) Then
Me.Schedules_Subform.Form.QC_Names_Combo.Value =
Me.Schedules_Subform.Form.QC_Names_Combo.ItemData(0)
Else
Me.Schedules_Subform.Form.QC_Names_Combo.Value = Me!Current_Name_Text
End If
Me.Schedules_Subform.Form.QC_Names_Combo_AfterUpdate
End Sub
**********************************************************
Code behind my Subform:
**********************************************************
Public Sub QC_Names_Combo_AfterUpdate()
Me.Parent!Current_Name_Text = Me!QC_Names_Combo.Value 'refreshes text box
with current combobox name
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim monday_count As Integer
Dim tuesday_count As Integer
Dim wednesday_count As Integer
Dim thursday_count As Integer
Dim friday_count As Integer
monday_count = 0
tuesday_count = 0
wednesday_count = 0
thursday_count = 0
friday_count = 0
Set db = CurrentDb()
'Get information for selected QC names.
Set qdf = db.QueryDefs("qrySchedules_Add/Edit")
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Month_Combo1]") =
Me.Parent!Month_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Day_Combo1]") =
Me.Parent!Day_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Year_Combo1]") =
Me.Parent!Year_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Month_Combo2]") =
Me.Parent!Month_Combo2
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Day_Combo2]") =
Me.Parent!Day_Combo2
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Year_Combo2]") =
Me.Parent!Year_Combo
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Schedules_Subform].[form].[QC_Names_Combo]") = Me!QC_Names_Combo '<-ERROR LINE
Set rst = qdf.OpenRecordset()
**********************************************************
Home - 2003 SP3 with Vista
Parent Form - frmMain
Parent Form Subform container - Main_Subform
Form - frmSchedules
Form Subform container - Schedules_Subform
Subform - frmSchedules_Add/Edit
When I click the Add_Edit_Label on my Form, the code goes to the AfterUpdate
event for a combobox control on my Subform. The last parameter in this event
code is where Vista throws up the following error:
Run-time error '3000':
Reserved error (-1038); there is no message for this error.
Does anyone know what is happening here?
Code behind my Form:
**********************************************************
Private Sub Add_Edit_Label_Click()
Me!Schedules_Subform.SourceObject = "frmSchedules_Add/Edit"
If IsNull(Me!Current_Name_Text) Then
Me.Schedules_Subform.Form.QC_Names_Combo.Value =
Me.Schedules_Subform.Form.QC_Names_Combo.ItemData(0)
Else
Me.Schedules_Subform.Form.QC_Names_Combo.Value = Me!Current_Name_Text
End If
Me.Schedules_Subform.Form.QC_Names_Combo_AfterUpdate
End Sub
**********************************************************
Code behind my Subform:
**********************************************************
Public Sub QC_Names_Combo_AfterUpdate()
Me.Parent!Current_Name_Text = Me!QC_Names_Combo.Value 'refreshes text box
with current combobox name
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim monday_count As Integer
Dim tuesday_count As Integer
Dim wednesday_count As Integer
Dim thursday_count As Integer
Dim friday_count As Integer
monday_count = 0
tuesday_count = 0
wednesday_count = 0
thursday_count = 0
friday_count = 0
Set db = CurrentDb()
'Get information for selected QC names.
Set qdf = db.QueryDefs("qrySchedules_Add/Edit")
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Month_Combo1]") =
Me.Parent!Month_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Day_Combo1]") =
Me.Parent!Day_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Year_Combo1]") =
Me.Parent!Year_Combo1
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Month_Combo2]") =
Me.Parent!Month_Combo2
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Day_Combo2]") =
Me.Parent!Day_Combo2
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Year_Combo2]") =
Me.Parent!Year_Combo
qdf.Parameters("[Forms]![frmMain].[Main_Subform].[form].[Schedules_Subform].[form].[QC_Names_Combo]") = Me!QC_Names_Combo '<-ERROR LINE
Set rst = qdf.OpenRecordset()
**********************************************************