Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with VB6 please.

Status
Not open for further replies.

raycomp

Programmer
Jun 17, 2003
5
0
0
US
I created a form with a dbcombo3, and two text boxes textoperator and textoperatorVar and data7 with properties:
select [Operator],[OperatorID],[OperatorVar] from Staff order by [Operator]

I need to check the condition of the field [operatorvar] to return a message depending on the condition

No problem to populate the first two fields with data7 from field [Operator] and boundcolumn[operatorid]

My problems is to find the coresponding data for the field [operatorvar]

I have tried the following code
Dim sqlstring as string
sqlstring = "select [operatorid],[operator],[OperatorVar] from Staff where [OperatorID] = " & DBCombo3.BoundText
Data7.RecordSource = sqlstring
Data7.Refresh
Text3.Text = DBCombo3.BoundText

text5.text = I NEED TO FIND THIS VALUE???
Result is error message
run time error 3061
too few parameters. expected 1
error due to data7.refresh

What do I do wrong or is there another way of doing this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top