lizzieborden
MIS
I have a program that look to sql to hold it's data. I have the use the following code to find specific data. Let's say I'm looking up Joseph in the database. There might be five Joseph's. I'd like to find the next Joseph if the first wasn't what I was looking for. Any help will be appreciated.
TIA
Dim fileasname as string
dim inttemp as integer
fileasname = InputBox("What agent do you want to find", "Find")
Me.BindingContext(dtagency).Position = 0
For inttemp = 1 To dtagency.Rows.Count - 1
If dtagency.Rows(inttemp).Item("file_as_name") = fileasname Then
ExitFor
Else
Me.BindingContext(dtagency).Position += 1
EndIf
Next
EndSub
TIA
Dim fileasname as string
dim inttemp as integer
fileasname = InputBox("What agent do you want to find", "Find")
Me.BindingContext(dtagency).Position = 0
For inttemp = 1 To dtagency.Rows.Count - 1
If dtagency.Rows(inttemp).Item("file_as_name") = fileasname Then
ExitFor
Else
Me.BindingContext(dtagency).Position += 1
EndIf
Next
EndSub