Can anyone help me about this?
the VB highlight the code
txtname1.Text = rs.Fields("Name")
and the number in txtid1.Text always being 1
and i can't change the number in this textbox
Code:Private Sub txtid1_change() FOOD = "Select * from menu" Set rs = New ADODB.Recordset rs.Open FOOD, conn, adOpenKeyset, adLockOptimistic If Not rs.EOF And Not rs.BOF Then txtid1.Text = rs.Fields("Food ID") txtname1.Text = rs.Fields("Name") rs.MoveNext rs.Close End If End Sub
It says "Operation is not allowed when the object is closed"




Reply With Quote