J
james
okay, so why won't this work?
i put the message box in to tell me what the code was writing, and it
is EXACTLY the same as if i hard coded it into the query criteria.
so , query criteria typed straight into query works but doesn't if
returned by the following function... by the way Chr(34) is ".
thanks in advance!
Public Function changeBatch() As Variant
Dim changeCriteria As String
Dim lowCriteria As Integer
Dim highCriteria As Integer
lowCriteria = InputBox("Enter the lower batch number:", "Accuracy
Report Creator")
highCriteria = InputBox("Enter the higher batch number:", "Accuracy
Report Creator")
changeCriteria = ">=" & Chr(34) & lowCriteria & Chr(34) & " And <=" &
Chr(34) & highCriteria & Chr(34)
changeBatch = changeCriteria
MsgBox (changeBatch)
End Function
i put the message box in to tell me what the code was writing, and it
is EXACTLY the same as if i hard coded it into the query criteria.
so , query criteria typed straight into query works but doesn't if
returned by the following function... by the way Chr(34) is ".
thanks in advance!
Public Function changeBatch() As Variant
Dim changeCriteria As String
Dim lowCriteria As Integer
Dim highCriteria As Integer
lowCriteria = InputBox("Enter the lower batch number:", "Accuracy
Report Creator")
highCriteria = InputBox("Enter the higher batch number:", "Accuracy
Report Creator")
changeCriteria = ">=" & Chr(34) & lowCriteria & Chr(34) & " And <=" &
Chr(34) & highCriteria & Chr(34)
changeBatch = changeCriteria
MsgBox (changeBatch)
End Function