ppkgoldengun
MIS
All,
Have the following code:
Private Sub cboBoxNum_AfterUpdate()
Dim strSQLSF As String
Dim TowerX As Integer
Dim BoxX As Integer
TowerX = Me.cboTower.Value
BoxX = Me.cboBoxNum.Value
strSQLSF = " SELECT * FROM tblBoxSlot "
strSQLSF = strSQLSF & " WHERE tblBoxSlot.Tower = TowerX And "
strSQLSF = strSQLSF & " tblBoxSlot.BoxNum = BoxX;"
Me.RecordSource = strSQLSF
Me.Requery
End Sub
When the event runs the sqlstring seems to be correct however when the code sets the record source the form is displaying a parameter prompt for TowerX and BoxX. Any ideas?
Many thanks.
Have the following code:
Private Sub cboBoxNum_AfterUpdate()
Dim strSQLSF As String
Dim TowerX As Integer
Dim BoxX As Integer
TowerX = Me.cboTower.Value
BoxX = Me.cboBoxNum.Value
strSQLSF = " SELECT * FROM tblBoxSlot "
strSQLSF = strSQLSF & " WHERE tblBoxSlot.Tower = TowerX And "
strSQLSF = strSQLSF & " tblBoxSlot.BoxNum = BoxX;"
Me.RecordSource = strSQLSF
Me.Requery
End Sub
When the event runs the sqlstring seems to be correct however when the code sets the record source the form is displaying a parameter prompt for TowerX and BoxX. Any ideas?
Many thanks.