473,320 Members | 1,829 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,320 software developers and data experts.

Vb6 Database to populate textbox in sequence

104 100+
Hi all,

A little problem someone can help me with. Got Access db connected through Adodc connection populating datagrid etc. What I am trying to achieve is for the database records which are each unique to populate a specific text box. I have no problem populating a set of textboxes relating to one recordset, but to do multiple is proving a headache. To explain better: I am doing a budget.

Database has following fields
Field 1 in db Cost Dept
Field 2 in db Month 1
Field 3 in db month 2
etc.
etc.

So data in each record has cost dept and 12 months budget entries.
Next line in db has next cost dept and it's 12 monh budget. Just like a spreadsheet in excel basically.

The problem is I want to show the database records in seperate textboxes at the same time. On a form you will have say 5 text boxes for cost dept and each will show it's 12 months of budgets in 12 textboxes listed in a row. first set is record 1 in database second set is record 2 in database. It is haveing the second set of textboxes to read record 2 and third set to read record 3 etc etc I have a problem with. If someone could please tell me how to do this i would appreciate it.

Thank you
Mar 3 '08 #1
1 3647
Wernerh
104 100+
Hi all,

A little problem someone can help me with. Got Access db connected through Adodc connection populating datagrid etc. What I am trying to achieve is for the database records which are each unique to populate a specific text box. I have no problem populating a set of textboxes relating to one recordset, but to do multiple is proving a headache. To explain better: I am doing a budget.

Database has following fields
Field 1 in db Cost Dept
Field 2 in db Month 1
Field 3 in db month 2
etc.
etc.

So data in each record has cost dept and 12 months budget entries.
Next line in db has next cost dept and it's 12 monh budget. Just like a spreadsheet in excel basically.

The problem is I want to show the database records in seperate textboxes at the same time. On a form you will have say 5 text boxes for cost dept and each will show it's 12 months of budgets in 12 textboxes listed in a row. first set is record 1 in database second set is record 2 in database. It is haveing the second set of textboxes to read record 2 and third set to read record 3 etc etc I have a problem with. If someone could please tell me how to do this i would appreciate it.

Thank you
Does not seem like anyone wants to help me with this or it is not possible.

Here iis my code that i have got for reading the record.

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data\adodb1.mdb"
Adodc1.RecordSource = "SELECT * FROM budget"
Adodc1.Refresh

Text98.Text = Adodc1.Recordset.Fields(1)
Text99.Text = Adodc1.Recordset.Fields(2)

This works great for the first record in the db, but would like to have Text99.text read the second record.

The only thought that comes to mind is something like this:
Text99.Text = Adodc1.Recordset.Row (2).Fields(1).........trying to identify the record nr in the database, but obviously it does not work.

Anyone with a solution?
Mar 4 '08 #2

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

Similar topics

2
by: C. David Rossen | last post by:
Hello: I have a registration form for classes. Each class has a fee. I have a drop down box whereby the user chooses his class. There is a textbox with the associated fee. I would like to...
0
by: anna | last post by:
I have a grid with some columns that are BOUND columns. I have three more columns that are TEMPLATE columns with textboxes inside. i need to populate one of the textboxes with information based on...
3
by: Doo-Dah Man | last post by:
I hope I can make this clear: I have an Access 2000 database that drives an ASP web site to track sales leads. There is a combo box , "units", that lists the inventory of models we sell. ...
2
by: chris | last post by:
hi, i managed to populate my datagris and add a template colum to update the database. when i click the update button i get an error. is there something wrong with my code. ...
13
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value....
4
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. ...
1
by: luvkling | last post by:
hi, i am new to asp.net. i currently doin a website. i created a add form in this form the user need to add in the record n when they press the submit button it will add the record into the access...
1
by: miadlor | last post by:
Hi, I've searched and searched..... I'm trying to use a combobox to load a textbox on selection. The problem is the textbox will populate according to what is selected, but not all the info...
5
by: jazznojive | last post by:
I've created a textbox control on a userform and I am trying to figure out how to make the text populate to a worksheet range in sequence automatically. I've figued out how to get the text that the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.