Active X and Data Grid

I am trying to access a SQL database and get a list for the user to select
from to be used in additional queries.

I have created an ActiveX Data Object and a Data Grid Object, and I am
trying to figure out how to link the two.

In visual basic, in the properties, there is a line called datasource that
links the two that isn't present in VBA.

Any help would be appreciated.


0
rmogy (16)
5/16/2004 9:35:45 PM
excel 39879 articles. 2 followers. Follow

2 Replies
732 Views

Similar Articles

[PageSpeed] 2

"Richard Mogy" wrote ...

> I am trying to access a SQL database and get a list for the user to select
> from to be used in additional queries.
> 
> I have created an ActiveX Data Object and a Data Grid Object, and I am
> trying to figure out how to link the two.
> 
> In visual basic, in the properties, there is a line called datasource that
> links the two that isn't present in VBA.
> 
> Any help would be appreciated.

I assume you mean MSDATAGRD.OCX. I use it in an Excel project, but I'm
using a recordset rather than a data control. The Datasource property
is available at run-time e.g.

  Set DataGrid1.DataSource = rs

--
0
onedaywhen (103)
5/18/2004 8:03:26 AM
Thank you.
"onedaywhen" <onedaywhen@fmail.co.uk> wrote in message
news:b8c9d0b7.0405180003.6152c45c@posting.google.com...
> "Richard Mogy" wrote ...
>
> > I am trying to access a SQL database and get a list for the user to
select
> > from to be used in additional queries.
> >
> > I have created an ActiveX Data Object and a Data Grid Object, and I am
> > trying to figure out how to link the two.
> >
> > In visual basic, in the properties, there is a line called datasource
that
> > links the two that isn't present in VBA.
> >
> > Any help would be appreciated.
>
> I assume you mean MSDATAGRD.OCX. I use it in an Excel project, but I'm
> using a recordset rather than a data control. The Datasource property
> is available at run-time e.g.
>
>   Set DataGrid1.DataSource = rs
>
> --


0
rmogy (16)
5/18/2004 2:03:10 PM
Reply:

Similar Artilces:

Sorry, here's the data!!!
Work Order Sub Code Status Code Work Order # Asset Number MAJ 48 209996 248482 MAJ 10 242552 110140 MAJ 48 261283 266092 MAJ 10 262684 253321 MAJ 80 270587 250623 MAJ 90 278131 248482 MAJ 80 278132 248483 MAJ 80 278133 248484 MAJ 80 278137 248485 MAJ 91 312322 253966 MAJ 48 312534 254051 MAJ 48 324296 253287 MAJ 10 333233 253966 MAJ 80 333238 47488 MAJ 80 333296 47731 MAJ 90 333714 47415 MAJ 14 335426 2250 MAJ 04 335444 253317 MAJ 81 335816 254051 MAJ 10 336009 0 MAJ 91 336013 0 MAJ 48 336023 112957 MAJ 10 336409 46649 MAJ 14 337899 254074 MAJ 10 338720 47381 MAJ 10 338992 47488 MAJ 48 339020...

labels assoc. w/specific data point
I would like to carry a label with a specific data point on a lin graph. I keep track of my blood pressure on a spreadsheet. I use a lin chart. I keep notes next to the data column of things that affect i such as starting/stopping a medication or stressful circumstances an show it to my doctor. It would help if I could show those note somehow on the graph. I know I can insert a text label on the chart much like a title. Bu that doesn't work very well because when I add more data on the sam page, the graph shifts so the label isn't associated with the same dat point anymore. I ...

moving data from one server to another with difference in collatio
Hi all I am facing a problem...which is summed up as follows...I am moving data from one server to another....they both have GP 8.0 and SQL 2000 installed on same plateform..however the SQL collation is different...the new server has Arabic collation which we want it to be like this...and the old server has English collation...so taking a backup and restoring it won't work...so I used DTS to transfer the data and I succeeded up to this step....however when I try to logon on GP with the ‘sa’ user...I get this error “Your SQL Server Login record is not a valid user record in great p...

Preventing Duplicate Data Entries /Please email me @ Zigball @ Gmail.com VBA Problems!
Hello microsoft.public.excel my name is Zig I am trying hard to find out how I can use a input application to input data into a specified excel sheet. I have learned how to input the data into the excel sheet although I need to prevent the inputs from being duplicated. I have used a validating solver to prevent duplicate entries but it only works if you type the text into the sheet. I am unable to get the input application to follow the validation rule. Is there a way that I can use a input application to prevent duplicate entries into the excel sheets and if duplicate data is true can i redir...

About Data Validation
Hi All I have excel worksheet using Data Validation for control input Value. In the raw data sheet, Define some Name e.g. "DBNAME", AREA","TABLE Name" range It is possible select one DBNAME value, just allow select a particluar list of AREA and TABLE NAME ? e.g. DBNAME AREA Table NAME DB1 A1 T1 DB2 A2 T2 DB3 A3 T3 A4 T4 A5 T5 T6 e.g. When select DB1 just allow user selec...

macro for inserting one row between different data
Hi, I am using excel 2003, my file looks like below order no invoice no amount 123 S1000 $10 234 S1000 $20 456 S1001 $30 123 S1001 $40 I want to use a macro to insert a blank row to separate different invoice no, how to write it ? Thanks eva cheng Hi, I have assumed your invoice numbers are in column B Sub Insert_Rows() 'insert a row at every name change in a column B Dim X As Long Set Sht = Sheets("Sheet1") MyColumn = "B" For X = Sht.Cells(Rows.Count, ...

X Axis, Excel 2007 problem...
I'm sure this is a super simple question. I just started testing some simple charts in 2007. I have a small grid with 4 years and 4 dollar values. (years are 2004, 2005, 2006, 2007). I want to make a simple bar chart with the $ values on the Y axis and the Years on the x axis. The Dollar values and bars display properly but the X axis lists 1, 2, 3, 4 under the bars rather than the years. I can't seem to find the ribbon or menu to change this to display the years. Any help is appreciated. Ever since Excel 1997, there has been this problem. If the x-values are numeric and y...

Business Data Lookup 08-27-07
Hi Does anyone have any expierence with the Business Data Lookup Snap-In for CRM? I have installed the Snap-in and it only allows for data from CRM to be imported into a Word document. We would like to export data from CRM to MS Word and do this directly within CRM. Is this possible? Any ideas or suggestions would be greatly appreciated. Thanks MarkB Hi Mark, Are you interested in custom solutions?. If so please drop a email. Regards, Manick manick.m@hotmail.com "Mark Braithwaite" wrote: > Hi > > Does anyone have any expierence with the Business Data Lookup Sn...

Line Chart x
Hi I want have my excel line charts updating automatically when new data is added every quarter. I also want the x – axis display as e.g. 2008Q1 or Q1 dec – 2008. I have at the moment mmm-yyyy, so it is in date formula so it updates automatically, however when a second axis e.g. Q1 is underneath it either won’t allow me to update automatically or there will be a large amount of blank space representing where I have chosen the source data to go to. So is it possible to have two x –axis one date and one text or to have one x – axis displaying date and text on charts that will automaticall...

X axis label help
I have created a line chart with four values from cells in sheet 1, sa A1:D1. Each data point corresponds to a different material. Th material names are in cells in sheet 1, say A2:D2. I select those cell with the material names as my category (X) axis labels. The materia names in the cells have underlining and subscripts, however thi formatting does not appear on the chart. How can I get the underlinin and subscripts to appear as they do in the cells on sheet 1? Thank yo for the help -- Message posted from http://www.ExcelForum.com Hi AFAIK you can't do this as the formulas only link v...

data analysis
When I try to create a histogram using the data analysis function, and I request a chart output, it won't let me do it, saying it cannot insert a chart into a shared workbook. However, I can insert the chart into a new workbook and then paste it back into the one I'm working in. I have hecked under the shared workbook section and made sure I am the only one who can use it (so technically should not be "shared"). Does anyone have any ideas?? Paul Hissey - > When I try to create a histogram using the data analysis function, and I request a chart output, it won'...

Moving data to custom entities
I have a customer in the Financial Services industry that would like to upgrade to 3.0. Part of the implementation will be creating a custom entity to store portfolio information (life insurance, diability, Dental, etc.). This data is currently stored in a SQL table from another application. I would like to move this data from its current location to my customer entity. Do I have to use data migration framework or the sdk to do this or can i just do this within SQL? Thanks. Ideally you would use the SDK to move the data. The DMF probably won't work for you (I'm not sure if...

Charting data points and show a target range on the same chart.
Can anyone offer advise on how to make a chart of data points (line) with in a particular range of target values? Speciffically, I am try to chart the pH values of my fish tank. I know how to plot the data points on a line graph, but I'd like to add a visual "highlighted" target range section. Ie, my data records the pH for three days (8.2, 8.4, 8.5). pH on the y-axis and the date on the x-axis. The acceptable range for the pH values for a saltwater tank is 8.1 - 8.5 How can I indicate this target range within the chart? Once I learn how to do this I can apply it t...

How to display a msgbox if on data change if field value wasn't nu
Is this possible to accomplish? A field (MyField) contains some text. When a user changes or deletes that text, I display a message box asking the user if he really wanted to change the text in MyField. The way my code is set up, the message box displays after every data change. (I'm not very good at writing code.) Dim ChgAnswer As Integer, MsgTitle As String, MsgDialog As Integer Const MB_YESNO = 4 Const MB_ICONEXCLAMATION = 48 Const MB_DEFBUTTON1 = 0, IDYES = 6, IDNO = 7 If Not IsNull(Me.MyField) Then Beep MsgTitle = "Data Change" MsgDia...

how do I write a formula: if (cell address) is less than X add Y
I am using Excel 2003 and I want to write a formula to add 2 cells with a condition that is the second cell value is less than a preset amount, i.e. $7.50 then add the preset amount instead of the value in the second cell. =a1+MAX(7.5,a2) -- HTH RP (remove nothere from the email address if mailing direct) "CTrophyMan" <CTrophyMan@discussions.microsoft.com> wrote in message news:3485F4E1-F431-4B73-9934-8943C8D10B76@microsoft.com... > I am using Excel 2003 and I want to write a formula to add 2 cells with a > condition that is the second cell value is less than a p...

Setting caret in edit control & activating it.
Hello Does anyone have any example code for setting and enabling the caret in an edit control ? Nicholas Take a look at the CEdit::SetSel() member function. -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "Nicholas Kingsley" <nickk@nildram.co.uk> wrote in message news:3f9d418a$0$106$65c69314@mercury.nildram.net... > Hello > > Does anyone have any example code for setting and enabling the caret in an > edit control ? > > Nicholas > > If you are asking how to create & use your own caret in an edit control then check...

Summary Emails with Previous Day's Newsgroup Activity
Google’s Great Plains newsgroup has functionality that sends me an e-mail approximately once a day summarizing activity, including topics that have had the most hits. This includes highlights of the most active topics and links directly to topics. I don't see it being available through the CustomerSource Newsgroups, but would love this functionality. Thank you, Dan Dugan ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

Web query
HI, I would like to extract data from below given site through web query. It needs to input date of query. HOw this can be possible through VBA?. I tried to record macro and run it but not successful. The web address is; http://www.moneycontrol.com/stocks/marketstats/blockdeals/index.php Thank you for your hlp. ...

Limitation on point labels in x-y plot.
Some time ago, Ron Peltier, in particular, gave me a lot of assistance on attaching labels to points. However, the method that best suits me for XY ("scatter) charts came from a suggestion by "Andy Pope" <andy@digitab.demon.co.uk> who mentioned Rob Bovey's XY Chart Labeler which is free and down-loadable from: http://www.appspro.com/utilities/utilities.asp Today, trying to label a chart with rather a lot of points, I came across a limitation of Rob's very useful labeller. It seems that the last point index it can handle is 707 in my chart when I wanted 751. I w...

Data Point on Graph "39409 versus 11/23/07"
I have numerous graphs wherein the X Axis represents the DATE. When I scroll my mouse along the graph line (searching for data points), I often see the accompanying data as... Series 1 Point "39409" Value 209 instead of: Series 1 Point "22-Nov" Value 209 HOW CAN I AVOID THE REFERENCE ON THE DATA LINE FROM REFLECTING THE SERIAL NUMBER INSTEAD OF THE DATE ITSELF??? (such as "22-Nov".) Thanks, FLKulchar What versio...

Newbie Question: Data/Sort
I used Excel to organize a table of data (<50 entries). Column A uses decimal numbering 1, 2.0, 2.1, 2.2, 3, etc. The data was entered out of order. Using Data/Sort, I've tried to put the list into the correct order, but the list is wack out of order. First I select the entire block of data. Then I choose Data/Sort: Column A, w/o header. First it didnt work 2.0, 3.0, 2.1, 2.2, 1,... I changed the cells from text to number. Then sort worked. 1, 2.0, 2.1, 2.2, 3,... I changed the name of one of the columns in the header, now sort doesnt work anymore. 1.0, 3.0, 2.1, 2.2, 2.0,... Wot? I...

Converting to 2000 from 1.x
Hi- I'm working on a rather old application that uses a Access 1.x database. Unfortunately, Access 2000 does not support conversion from 1.x. Is there any way (other than digging up a really old copy of Access) that I can convert this database? Thanks ...

Separated data in one column to multiple columns
Howdy Excel experts, I have one big column of data, each chunk of values separated by a space of blank cells. I'd like to take all the data chunks and put them each in their own column, beginning at the top of the worksheet. Basically taking one long column of data and transforming it into a shorter, wider worksheet. I hope this makes sense. Thanks for your help! Use Data | Text to Columns best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email <leenathan@gmail.com> wrote in message news:1151688672.527874.317430@b68g2000cwa.googlegroups.com... &g...

How do I stop charts updating when I reorder the data
I have tried with Excel 2003 and I can start an XY chart and then change the order of the data by sorting to put it into a different chart without it changing the chart. with 2007 this does not appear to happen and my original chart changes. I would expect an XY chart in any version of Excel to alter when the data is reorder best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "j99harrison" <j99harrison@discussions.microsoft.com> wrote in message news:F513C55D-744D-48FB-AC20-BF9747DF50E5@microsoft.com... > I have...

ComboBox in Subform will not display Query Data
To all, I have a situation that is very confusing to me. I have made many form/subform conditions and never have had this situation happen... For lack of better terms we will call the main form MAIN and the subform SUB. In the subform I have a comboBox called ITEMID and it uses a query to pick a list of items based on certain criteria. Here is what happens... I open the MAIN form and prompt the user for info some info using an inputbox. Then the MAIN w/SUB open just fine. My Links are ProjectID;ReleaseID. The MAIN form table (tblReleaseMemo) has the record started and the SUB table (tbl...