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...
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)...
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...
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...
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")...
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...
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...
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...
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
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...
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...
I have four fields in a query:
Date Sent
APacks
BPacks
CPacks
DPacks
I need to construct a query where:
Date Sent = Is Null
AND ANY ONE OF THE FOLLOWING IS TRUE:
APacks = Not Is Null
OR
BPacks = Not Is Null
OR
CPacks = Not is Null
OR
DPacks = Not Is Null
How do I do this? Basically how do...
I am using a List View object and want to make it look like a ledger account - i.e. with alternating colours in each row (vbYellow, vbWhite, vbYellow, vbWhite etc.).
Does any one know if this is possible?
Any help appreciated.
Thanks
I am using a List View object and to make it look like a ledger account - i.e. with alternating colours in each row (vbyellow, vbwhite, vbyellow etc.).
Does any one know if this is possible?
Any help appreciated.
Thanks
I have two tables - tblOrders and tblClaims.
A person can order forms for many claim claims.
We may therefore dispatch many forms to a client who may return any combination of the forms to us.We therefore only create a claim record (tblClaim) for each claim when we recieve a claim form back...
Is there a way to limit the number of characters in an unbound text box to 255 characters? - i.e. so that when the user reaches 255 characters they can no longer type any more into the text box.
At present the user can keep typing blisfully unaware that only the first 255 characters will...
Is there a way of starting the Primary Key on an Access table from a certain number, say 5000, rather than from 1 (other than just creating 5000 dummy records and deleting them).
Any help appreciated.
Thanks
I need to get the names of all subfolder names in a main folder. I have set reference to run time scripting and using the FileScripting object but cannot work out the code. I believe its along the lines of:
Public Function Get SubFileName()
Dim MainFolder As Folders
Dim F As Folder
Dim Fsys As...
I am using an ListView object in Access and have set my data field to currency (standard) so that numbers appear with commas - i.e. 100,000.
However, when I load the data from the table into my ListView (Report Syle) list, all the formatting (i.e. commas) dissappear so it appears as 100000...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.