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!

Simple VB form to access db question

Status
Not open for further replies.

pe

Technical User
Aug 8, 2001
31
0
0
US
I have 3 tables; tblProject (ProjectID*, ProjDesc, ClientID*, JobNo*), tblClient (ClientID*, ClientName), and tblJobNo (JobNo*) in my access mdb. I used VB6's wizard to make a form. I can scroll thru my projects and view them fine. When i hit the "add" key i can add new projects but i can't view the clients and jobno's that are already entered in my mdb tables. How can i make these a dropdown list box that will show what is already in my tblClient and tblJobNo when i hit the "add" button?

Also, when I add new projects that have new clients and new jobnos will all 3 tables be updated?

I can do this easily in Access but none of my users have access and the run-time version is too cumbersome to give them. I would like to write a VB application instead but what is ez in Access, i don't know how to transfer to Visual Basic code. Can someone please give me a start in the right direction. Thanks very much.

 
Let me try to undestand what you got here. You want to be able to have dropdown list box to show what you have already in the Database BEFORE you enter any other information, and when do you want to view this info.
Im not familiar with what kind of form the Wizard gives you, I usually create my forms by scratch. What fields are shown on the form and what exact info are you providing the form?
How are you connecting to your .mdb?

 
I want to have a form that enters records into my tblProject table in access. On this form I want to have a dropdown listbox that contains the JobNo's from tblJobNo and another one that has the clients from tblClient. (all 3 tables are in main.mdb) I will enter the ProjDesc, choose a JobNo and Client from the dropdown lists and then hit "add" to add them to the tblProject table in my main.mdb.

I don't know how to get the JobNo field from tblJobNo into the cboList1 box and the Client field from tblClient into the cboList2 box. Also, i don't know the code for the "add" button that will update my tblProject table.

I hope this helps and i appreciate your time. thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top