D
Dsperry101 via AccessMonster.com
Hey y'all
I'm trying to make a form recordsource from a previous form
combo box , I keep getting "you cancelled previous operation"
regardless of which event I put the following code:
Private Sub cmdGo_Click()
MWONumberSelected = cboMwoselect.Column(0)
''' MsgBox MWONumberSelected
Dim sqlrecordselect As String
sqlrecordselect = "SELECT DISTINCT * FROM tblNewMWO WHERE " _
& "tblNewMWO.[Work Order Number] = " _
& MWONumberSelected & ";"
Form_frmMWOFull.RecordSource = sqlrecordselect
MsgBox sqlrecordselect
DoCmd.OpenForm "frmMWOFull"
End Sub
or in the opening form current event
Dim sqlrecordselect As String
sqlrecordselect = "SELECT DISTINCT * FROM tblNewMWO WHERE " _
& "tblNewMWO.[Work Order Number] = " _
& MWONumberSelected & ";"
Form_frmMWOFull.RecordSource = sqlrecordselect
MsgBox sqlrecordselect
End Sub
Thanks
Dan S
I'm trying to make a form recordsource from a previous form
combo box , I keep getting "you cancelled previous operation"
regardless of which event I put the following code:
Private Sub cmdGo_Click()
MWONumberSelected = cboMwoselect.Column(0)
''' MsgBox MWONumberSelected
Dim sqlrecordselect As String
sqlrecordselect = "SELECT DISTINCT * FROM tblNewMWO WHERE " _
& "tblNewMWO.[Work Order Number] = " _
& MWONumberSelected & ";"
Form_frmMWOFull.RecordSource = sqlrecordselect
MsgBox sqlrecordselect
DoCmd.OpenForm "frmMWOFull"
End Sub
or in the opening form current event
Dim sqlrecordselect As String
sqlrecordselect = "SELECT DISTINCT * FROM tblNewMWO WHERE " _
& "tblNewMWO.[Work Order Number] = " _
& MWONumberSelected & ";"
Form_frmMWOFull.RecordSource = sqlrecordselect
MsgBox sqlrecordselect
End Sub
Thanks
Dan S