DBGrid connection through ADO (SQL)

Sharad Singh

New Member
Joined
Jul 11, 2009
Messages
8
Hi All,

Can any body help me to retrieve the data from MS access table in to the DB Grid at user form through MS SQL Query.

I am trying to use ADO for the same.

Thanks,
sharad
 
I'm afraid I can't be of great assistance since I'm not able to use this control myself, and haven't done so in the past.

Here is a website that has some info on using a flexgrid (article 2 of 2):
http://www.pbdr.com/vbtips/gen/Article-UsingFlexGrids(2).htm

I would add the following comments:
1) The first question I would ask is do you want your flexgrid control to maintain a dynamic connection to the underlying data source? In other words, if your user edits a value, should this update travel back to the original data source? That's probably a little more work - either committing changes or coding the updates.

2) If the control only needs to "show" data, then its probably simpler. Just query your data source, get the information of interest, and use the additem method of the flexgrid control to populate the grid. There would be no need to worry about changes to the data if it is all read-only.

3) I'm guessing that Norie is only asking what kind of information you want to display and why you need a flexgrid to do it. There are other ways to display data on a userform in Excel. Where is the data coming from? Who knows if you even need ADO for that matter...

Alex
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top