in vb6
I have a database that has a table (customers) with five attributes (custID, name, street, city, and amtPurchases). I am trying to use vb to manipulate the data in the database (part of a class I am taking). I have four text boxes that are to be used on an order entry form, one each for custID, name, street, and city. I can set up the code that will allow the user to enter a custID and vb will fill in the rest of the text boxes automatically. The problem I am running into, is there is a checkbox for new customers. When a new customer calls, the user should check the checkbox and vb should give the next available custID in the the custID textbox, then the user can enter the new customers name, street and city. The record would be updated on the lostfocus event of the city textbox.
My problem is I can’t figure out how to have vb place the next available custID into the custID textbox after checking the checkbox.
Any ideas or thoughts.