Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ProjectExplorer

    Referencing a projects Connection Object

    Hi When you create a new data connection (using the Wizards) I presume a new Connection object is added to your project containing the connection string etc. amoungst it's properties. I want to pass that connection object to another object - how can I reference the projects Connection Object...
  2. ProjectExplorer

    Return Count/Sum from a Scalar Query

    Good call...makes life a whole lot easier. Thanks
  3. ProjectExplorer

    Return Count/Sum from a Scalar Query

    I need to return the Count and Sum of a query in VBA. i.e. Dim Db as DAO.Database Dim rst as DAO.Recordset Dim SQL as string Dim Total as Integer SQL = "SELECT SUM (etc. Etc)" ....with paramters taken from a form text boxes. Set Db = CurrentDb Set rst as Db.OpenRecordset(SQL, DbOpenDynaset)...
  4. ProjectExplorer

    Printing VB Code - Lines

    Before I'm tempted to spend more cash on an Add In..... When you view VB code in the IDE, the functions/procedures are nicely divided by lines across the screen making it easy to see when one begins and the other ends. Is there a hidden option somewhere to print these lines when printing out...
  5. ProjectExplorer

    Nothing & Dispose

    Many thanks for all your explanations. I'll will keep it for reference - promise not to stick it in the garbage! Regards
  6. ProjectExplorer

    Nothing & Dispose

    Thanks for explaining this further - Only thing I don't quite grasp here is how does the GC know whether a NOTHING variable (effectively memory set aside but not used - i.e. just DIM'ed) isn't just waiting for a value. At what point are they ready to be "Garbaged"?
  7. ProjectExplorer

    Nothing & Dispose

    Thanks for clarifying this Qik3Coder - also explains why "Nothing" and "Dispose" exist when we have the Garbage Collection.
  8. ProjectExplorer

    Nothing & Dispose

    What is the general rule on setting objects to Nothing & Dispose in VB.Net. I read some where the VB.NET "cleans up" and releases onjects. When reading about VB.Net some examples set objects like OleCommand objects to Nothing and Dispose of them whilst others don't.... What is the general...
  9. ProjectExplorer

    Conversion from type 'DataRowView' to type 'String' Error

    Many thanks for your response. After a little trial and error I managed to come up with a solution. Because I am loading the ComboBox from a Dataset, the Combox contains a collection of data row (objects) not just simple numbers. To get to the Value Member and Display Member I created a...
  10. ProjectExplorer

    Conversion from type 'DataRowView' to type 'String' Error

    I have Combobox which is filled via a dataset and datatable as follows. 'Get table from the dataset DT = DS.Tables(0) 'Fill the ComboBox With cboMediaCode .DataSource = DT .ValueMember = "MID" .DisplayMember = "MediaCode" End With How do I retrieve the ValueMember ("MID")...
  11. ProjectExplorer

    ADO - Get New Record ID

    I am adding a new record to an Access table using a OleCommand and SQL string containing "INSERT INTO tblOrders etc...." The back end table contains a AutoNumber field to generate a unique Order ID ("OID")as soon as the new record details are inserted by the code. My problem is that I need to...
  12. ProjectExplorer

    Combo Box Question - VB.Net

    Many thanks Ernst Jan, I will give this a go....seems to be just what I needed. Thanks for your help.
  13. ProjectExplorer

    Combo Box Question - VB.Net

    I want to load a Combo Box with a simple list of Countries from a table using the add method. When I load the Countries I also need to add the Countries unique table ID so I can retrieve the users selection by the ID not the Country Name. i.e if "Germany" had an unique table ID of "17", I need...
  14. ProjectExplorer

    Change Command Text At Run Time

    I am connecting to an access database by dragging data objects onto my form (Dataset etc.) I want to be able to change the (OleDbCommand)Command Text property at run time so it includes the value from a text box in the query. But I dont know how to get to the Command Text property. Can any one...
  15. ProjectExplorer

    ListView - Get Item Key

    Thanks for the response migr8now. No doubt there is a logical reason for it hiding away in someone's head at Microsoft! For those who also want to discover the "Secret of the Key" - you can retreive it with: Private Sub lstContacts_ItemActivate(ByVal sender As Object, ByVal e As...
  16. ProjectExplorer

    ListView - Get Item Key

    When you add each item you can give it a key (or name)as string, the item text as string and the image key. The item key (or name) is a unique indentifier for the item. In VBA you can use the Item-Click event which passes the Item as an object where you can get its item key. I can't find the...
  17. ProjectExplorer

    ListView - Get Item Key

    I have created a ListView in VB.NET and added an item using: lstView.Items.Add("Item/1", "An Item", 0) Thus the item key is "Item/1". How do I retrieve the item key. What event do I use etc. Any help appreciated. Thanks
  18. ProjectExplorer

    Connecting To Access

    I all new to VB.NET (2008) but am slowing moving across from VBA. What is the best (EASIEST) way to connect, read and write data to an access database? ADO.NET? I also need to be able to include queries with parameter values taken from fields on forms. I am not sure where to start. Sorry this...
  19. ProjectExplorer

    VBA - VSTO

    Tony Thanks for you reply - it clarifies a number of things for me.
  20. ProjectExplorer

    VBA - VSTO

    I have built lots of Access/Excel/Word VBA applications / functions and am now looking at the future - but I am well confused. Can anyone please help explain where VBA is heading in terms of MS Office. Does VSTO now completely replace VBA (albeit using the .net IDE). Do I buy VSTO as a separate...

Part and Inventory Search

Back
Top