G
Grace
I developed a query that returns all queries in my database.- eg.
SELECT Name, Type
FROM MSysObjects
WHERE (Type = 5 = -32764)
ORDER BY Name
What I want to do is create a combobox in a form that populates all queries
in my database based on above query. I created code in After Update Events
of Combo69 as noted below. Everything compiles OK; but when going to the
combo box on the form, it doesn't work. The combo field remains blank.
What am I doing wrong? Any assistance is most appreciated.
Private Sub Combo69_AfterUpdate()
On Error GoTo Err_Combo69_Click
Select Case Me.Combo69.Column(1)
Case 5
DoCmd.OpenQuery Me!Combo69
Case -32764
DoCmd.OpenReport Me!Combo69, acViewPreview
Case Is Null
MsgBox "No item selected!"
End Select
Exit_Combo69_Click:
Exit Sub
Err_Combo69_Click:
Resume Exit_Combo69_Click
End Sub
SELECT Name, Type
FROM MSysObjects
WHERE (Type = 5 = -32764)
ORDER BY Name
What I want to do is create a combobox in a form that populates all queries
in my database based on above query. I created code in After Update Events
of Combo69 as noted below. Everything compiles OK; but when going to the
combo box on the form, it doesn't work. The combo field remains blank.
What am I doing wrong? Any assistance is most appreciated.
Private Sub Combo69_AfterUpdate()
On Error GoTo Err_Combo69_Click
Select Case Me.Combo69.Column(1)
Case 5
DoCmd.OpenQuery Me!Combo69
Case -32764
DoCmd.OpenReport Me!Combo69, acViewPreview
Case Is Null
MsgBox "No item selected!"
End Select
Exit_Combo69_Click:
Exit Sub
Err_Combo69_Click:
Resume Exit_Combo69_Click
End Sub