473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Combine tables in a single form

13
Hello.

I have MS Access 2003 and Visual Basic 6.0.

In the Access database and two tables tblA and tblB that have a common field fldPN (Personal Number). I use ADO connection.

From tblA I have selected a few columns that I show in VB Form1, and a datagrid showing all rows with the same fldPN value in both tables. This works perfect, and was not to hard to code.

However, instead of the datagrid (Or in the datagrid) I would like to show comboboxes for some of the values with a few pre decided values. I need to show from 1 to 5 rows form tblB for each row in tblA. My challenge is instead of the datagrid (or in the datagrid) to show separate text- and comboboxes, showing one line for each row in the table with corresponding value in the fldPN field. I have earlier coded this in MS Access, but are now trying to do the same in Visual Basic.

Somebody who have some sample code?
Mar 1 '07 #1
1 1527
willakawill
1,646 1GB
Hi. When you are moving to hand coding your forms like this you need to think of each combo box separately. Create a recordset for each one and populate it then close the recordset. do the same for your textboxes. If they can be filled with a single query then so much better. There is no real benefit from trying to do this all in one query. The slowest part of this kind of code is the connection object. Once this is open you can open and close recordset very quickly.
Mar 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Aladdin | last post by:
I have an MS Access form on which I have a listbox listing tables in that database. I want to be able to click on any of those tables and view its contents on the same form using subforms or any...
1
by: snOOp | last post by:
I am trying to combine the data from two similar tables into one query, but I need for all of the records from both tables to show up and I want the ones that have matching 'emplid' to be combined...
1
by: mojo | last post by:
We have set up an Access database with tables x,y, & z where we would like to have multiple people entering data into a table x. Each person has an identical copy of the database on their PC's. ...
2
by: Reidar Jorgensen | last post by:
I have several Access databases, identical in structure, but different data. Is there an easy way to combine them all into one database? There are six tables, I just want the data from all...
1
by: Sergio | last post by:
Hello everybody. Somebody has given me nine files with some data for the years 1997, 1998, ... , 2005. They are 9 different mdb files. Each one has many tables, forms, and other things. But all...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
2
by: nugz | last post by:
I want to combine 3 tables with like data then append it with a filter. Tables: NewStarts, Complaints, Memos Combine: Date, Address, Route, Pub, etc.... Then sort: previous 8 days, pub/freq...
5
by: Rodjk #613 | last post by:
Hello, I am working with a database that is in use in several locations. The structure of the databases are identical, but the data is different. I am tasked with combining the data into one...
1
by: bluereign | last post by:
Thank you for your assistance. I am a novice looking to JOIN and append or combine records from 2 current Tables into 2 new Tables named below. I have been able to JOIN Tables with the script...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.