NeoFax
2010-08-27 12:38:12 UTC
Me.txtMaterial is not grabbing the actual text string from the text
box. When I step thru the code,
Me.txtMaterial is Null. Why is it not grabbing the txtMaterial info?
Private Sub txtMaterial_KeyDown(KeyCode As Integer, Shift As Integer)
fltrInfo = ""
fltrMaterial = Null
fltrMaterial = Me.txtMaterial
If KeyCode = 13 Then
If IsNull(Me.lstPlant) Then
fltrInfo = "(((tblMaterial.Material) Like '" & fltrMaterial &
"'))"
Else
fltrInfo = "(([tblMaterial].[Material] Like '" & fltrMaterial
& "')) AND ([tblMaterial].[Plnt]='" & Me.lstPlant & "')"
End If
DoCmd.OpenForm "frmAllMaterial", acNormal, , fltrInfo
End If
End Sub
box. When I step thru the code,
Me.txtMaterial is Null. Why is it not grabbing the txtMaterial info?
Private Sub txtMaterial_KeyDown(KeyCode As Integer, Shift As Integer)
fltrInfo = ""
fltrMaterial = Null
fltrMaterial = Me.txtMaterial
If KeyCode = 13 Then
If IsNull(Me.lstPlant) Then
fltrInfo = "(((tblMaterial.Material) Like '" & fltrMaterial &
"'))"
Else
fltrInfo = "(([tblMaterial].[Material] Like '" & fltrMaterial
& "')) AND ([tblMaterial].[Plnt]='" & Me.lstPlant & "')"
End If
DoCmd.OpenForm "frmAllMaterial", acNormal, , fltrInfo
End If
End Sub