vaughn9
Technical User
- Sep 23, 2001
- 183
I am using the code below with msflexgrid to display the age of a customer. It works fine, but how can I use an operator < or > or <> in the message box. I know I can do it in an an sql statement in a text box and then use the command button to say data1.record source = text1, but I want to use the input box and still be able to say less than or more than a particular age or between two ages
Can someone tell me how I can get that done using the input box
my present code
Dim mystring As String
mystring = InputBox("Enter Customer Age Please name", "Client Name")
Data1.RecordSource = "select Surname, Age, Salary from datatable where Age = '" & mystring & "'"
Data1.Refresh
MSFlexGrid1.Refresh
Can someone tell me how I can get that done using the input box
my present code
Dim mystring As String
mystring = InputBox("Enter Customer Age Please name", "Client Name")
Data1.RecordSource = "select Surname, Age, Salary from datatable where Age = '" & mystring & "'"
Data1.Refresh
MSFlexGrid1.Refresh