ScrmingWhisprs
I <3 Coffee Milk.
- Local time
- Today, 06:36
- Joined
- Jun 29, 2006
- Messages
- 156
This one is really bugging me and I can figure it out for the life of me.
I have a form (frmSelect) that can be opened from different forms that acts as a code selection form. I have an unbound listbox and 2 textboxes that are hidden (txtForm and txtControl). On another form I have on the Double Click Event of a textbox this code:
So here's what happens on the Double Click Event: The form (frmSelect) opens. The listbox and the 2 textboxes do not populate. When I close the form, I get a runtime error 2450: can't find the form 'frmSelect'.
I don't know what I'm doing wrong...
Thanks
I have a form (frmSelect) that can be opened from different forms that acts as a code selection form. I have an unbound listbox and 2 textboxes that are hidden (txtForm and txtControl). On another form I have on the Double Click Event of a textbox this code:
Code:
Private Sub ReportType_DblClick(Cancel As Integer)
Dim strSQL As String
strSQL = "SELECT [tblReportTypes].[ID], [tblReportTypes].[ReportType] FROM [tblReportTypes] ORDER BY [ID];"
DoCmd.OpenForm "frmSelect", acNormal, , , , acDialog
Forms!frmSelect!txtForm = Me.Name
Forms!frmSelect!txtControl = "ReportType"
Forms!frmSelect!lboSelect.Rowsource = strSQL
End Sub
So here's what happens on the Double Click Event: The form (frmSelect) opens. The listbox and the 2 textboxes do not populate. When I close the form, I get a runtime error 2450: can't find the form 'frmSelect'.
I don't know what I'm doing wrong...
Thanks