Playmaker
Dec 27th, 1999, 06:45 AM
Hi, I'm still learning VB programming, but I just started my first project at my new job, and I need help. I'm trying to populate a text field or label with text that it gets from another table in my database. I'm using Visual Basic 6 w/ SQL Server 7 as database.
For example: I have my main table which is my CUSTOMERS table with all the usual information. One of the fields in that table is OCCUPATION CODE. Whatever the customer's occupation is, instead of having the whole description, I use a code to represent it like '45' which is 'Agriculture Industry'. In another table called OCCUPATION CODES, is where I have two fields, the occupation code and the occupation description. On my form I want to be able to type in the code like '45' and have the label or text field automatically give the description. How can that be done? Thanks...
For example: I have my main table which is my CUSTOMERS table with all the usual information. One of the fields in that table is OCCUPATION CODE. Whatever the customer's occupation is, instead of having the whole description, I use a code to represent it like '45' which is 'Agriculture Industry'. In another table called OCCUPATION CODES, is where I have two fields, the occupation code and the occupation description. On my form I want to be able to type in the code like '45' and have the label or text field automatically give the description. How can that be done? Thanks...