I have an Access Database, one of the forms has a text box that is read only (text58)this contains a customer number (this customer is brought out by the query that generates the page). I have another text box (text41), I need to display the answer to an SQL statement in text41.
This SQL statement uses the customer number in text58 to pull out the corresponding customer name I just need help with the SQL statement that is going to sit in VB code behind text box text41, i think its something along the lines of
Private Sub Text41_AfterUpdate(Cancel As Integer)
Text41.text = “SELECT [customer name] FROM tblcustomers WHERE [customer number] LIKE '" + Text58.TEXT + "'”
End Sub
But I cant get it to work
Any help would be most grateful
This SQL statement uses the customer number in text58 to pull out the corresponding customer name I just need help with the SQL statement that is going to sit in VB code behind text box text41, i think its something along the lines of
Private Sub Text41_AfterUpdate(Cancel As Integer)
Text41.text = “SELECT [customer name] FROM tblcustomers WHERE [customer number] LIKE '" + Text58.TEXT + "'”
End Sub
But I cant get it to work
Any help would be most grateful