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

datagrids

lee123
556 512MB
i have made an access database but i want to use the information in the database in an visual basic form the form i have made has a datagrid on it but i don't know how to enter the information in the datagrid. i have surfed the web to find out how to do this but i really don't understand it. the database im using is access 2000 and the visual basic is the vb6 if you could help me understand how this is done i would be very greatfull to who ever helps me. in the database i have a orders table i would like the datagrid to show the customers account number and orderdate and duedate

thanx lee123
Oct 1 '07 #1
8 1268
Ali Rizwan
925 512MB
i have made an access database but i want to use the information in the database in an visual basic form the form i have made has a datagrid on it but i don't know how to enter the information in the datagrid. i have surfed the web to find out how to do this but i really don't understand it. the database im using is access 2000 and the visual basic is the vb6 if you could help me understand how this is done i would be very greatfull to who ever helps me. in the database i have a orders table i would like the datagrid to show the customers account number and orderdate and duedate

thanx lee123
What type of control you are using
ADO RDO or simple DATA control

ALI
Oct 1 '07 #2
lee123
556 512MB
its a ado control the data1control doesn't seem to work

lee123
Oct 1 '07 #3
Ali Rizwan
925 512MB
its a ado control the data1control doesn't seem to work

lee123
Ok
Set DataSource Property to the name of your ADO name.
Suppose you want to link you DGrid to ADODC1 then Set DataSource property to ADODC1.
And if you are using DataEnvironment then Set DataSource property to DataEnvironment name and DataMember to to the Commad.

run the programe and you ll see your all data will managed in the DGrid.

GOODLUCK
ALI

-------------------------
Oct 1 '07 #4
lee123
556 512MB
Hey thank you Ali, it worked. but one question? can you put more than on datagrid on a form? if so is the steps the same? if not what do i need to do?

Lee123
Oct 1 '07 #5
Ali Rizwan
925 512MB
Hey thank you Ali, it worked. but one question? can you put more than on datagrid on a form? if so is the steps the same? if not what do i need to do?

Lee123
Hi,
Yeah you can add infinite Grids on your form.And the steps are same.
GOODLUCK
ALI
Oct 1 '07 #6
lee123
556 512MB
Now that i have two datagrids i have to different table information showing one is the order table and the other is the customer table (off of the access database) my question is how do i link the information to the right customer.so when i scroll to the next customer the datagrid should also change shouldn't it? i don't know this is way different that access.

p.s
both of the tables (access) have ID's linked to one another in access.

lee123
Oct 1 '07 #7
Ali Rizwan
925 512MB
Now that i have two datagrids i have to different table information showing one is the order table and the other is the customer table (off of the access database) my question is how do i link the information to the right customer.so when i scroll to the next customer the datagrid should also change shouldn't it? i don't know this is way different that access.

p.s
both of the tables (access) have ID's linked to one another in access.

lee123
Ok
Have you used seperate database for every customer order or you have manuplate the order into a single database?
GOODLUCK
ALI
Oct 2 '07 #8
Ali Rizwan
925 512MB
Now that i have two datagrids i have to different table information showing one is the order table and the other is the customer table (off of the access database) my question is how do i link the information to the right customer.so when i scroll to the next customer the datagrid should also change shouldn't it? i don't know this is way different that access.

p.s
both of the tables (access) have ID's linked to one another in access.

lee123
Hi,
The way i m using to make a link b/w teachers name and thier monthly attendance in my database i have a seperate database for every teacher.

I have done suchthing.
At the back i have named the databases by teachers seril no or customer serial no.whenever the serial changes the database with named the serial number opened and shown in the grid.
You can say
If the serial no of customer is 1 then database no 1 opened to ADODC2
when 2 database no 2 opened to ADODC2
and so on.
**************
And the next type you have only one database
then its very easy use this code to choose the order associated with customer.

with respect to name

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim cs As String
  3. cs = txtCustomerName 'Must be from customer info database
  4.  
  5.     ADODC2.Refresh
  6.     ADODC2.Recordset.Find "Name='" & cs & "'"
  7.  
  8.  
With respect to Serial No

Expand|Select|Wrap|Line Numbers
  1.  
  2. ADODC2.Refresh
  3. ADODC2.Recordset.Find "Sr = " &  txtSR ' Must be from customer info
  4.  
  5.  
GOOD LUCK
ALI
Oct 2 '07 #9

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

Similar topics

1
by: | last post by:
In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
1
by: Simon Harris | last post by:
Hi All, I wish to populate more than one datagrid from the same OleDBCommand. The code I have is: Dim objCmd As New OleDbCommand(strSql, objConn) Then... ...
4
by: ree32 | last post by:
I have a placeholder and depending on a user input(a drop downlist) when the user clicks a button I dynamically create a number of datagrids and fill them with data from a database. But the problem...
0
by: Scott Meddows | last post by:
I'm having trouble scrolling some datagrids so they sync up... I have two identical datagrids on a form, filled with eh same dataset. I want a user to be able to scroll on the datasets and the...
4
by: | last post by:
Hello. In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Jim | last post by:
OK here's my disclaimer: I'm very new to ASP.NET and posting on Google Groups, so please bear with me and feel free to correct either the way I code or the way I post. I have an ASP.NET page...
1
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, I am using the code below to export a webpage to Excel. The webpage has three datagrids on it and they are all exported to Excel properly and everything looks very nice, but we would really...
1
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.