So, if I understand you correctly, I use a collection to hold the data, and I then loop through the collection and insert one record at a time into the database?
Hi all,
I am parsing a relatively large text file, and I need to split the information into various fields, and then insert the parsed data into a database.
At the moment, I have the parsing bit working fine, and I create an array to temporarily hold all the information - this is a 2-dimension...
Just started with Visual Basic Express 2008, after coming from an Access and VBA background.
I am trying to do is loop through a multi-select listbox and retrieve all the selected items, but it doesnt want to play nice.
What I have tried:
***********************
For Each varItem...
I have also tried, with same result
If Me.ListBox1.SelectedItems.Count <> 0 Then
' If so, loop through all checked items and print results.
Dim x As Integer
Dim s As String = ""
For x = 0 To ListBox1.SelectedItems.Count - 1...
Wow, this is driving me crazy.
Just started with Visual Basic Express 2008, after coming from an Access and VBA background.
All I am trying to do is loop through a multi-select listbox and retrieve all the selected items, but it doesnt want to play nice.
What I have tried:
For...
The reason why I cannot select both FullString and MergeString is that *every* FullString is unique.
i.e. if I do
SELECT DISTINCT FullString, MergeString from qryMergeTime;
or if I do
SELECT DISTINCT FullString from qryMergeTime;
then I will return every single record. Which is not what I...
I have a select distinct query as follows:
SELECT DISTINCT [MergeString] FROM qryMergeTime
Whilst this does return the right records (i,e. only shows unique records in the [MergeString] field, it doesnt show all the fields that I need to see, i.e. the SELECT DISTINCT function needs to run on...
Hi all,
Need some tips to help me approach this problem. I would consider myself advanced in Access and VBA, so just looking for conceptual pointers.
In essence, I have a number of text files, each of which contains data that is parsed into various database tables. The data thus stored in the...
Did you import the GetFileInformation() module into your new database?
Did you compile your code?
You may have to set references to Microsoft Excel and Microsoft Office in vba editor.
Yeah, I saw the string variable name issue, and also wondered about the unique index issue.
As mentioned, I could sort this our using table definitions, but this would present some user-friendly issues.
So, back to my original code or using dcount....which do you reckon is faster? Intuitively...
Hi,
I have written the following procedure which prevents duplicate records from being inserted into a table. This works 100%, but was wondering if there were any other (more efficient?) ways of doing this. I am aware that this could be done with table definitions, but not quite sure of the...
Thanks for that.....
I have since had someone run a test on 1,000,000 records and there was no performance change between going parent/child or query criteria
Do this rather:
On the 'On change' event of the Pat_DOB textbox, put the following code. NOte that this assumes that the Age of client textbox is called txtCurrentAge.
txtCurrentAge==(Int((Date()-[Pat_DOB])/365))
That way, everytime you change the DOB, the age will update automatically.
Hope...
As a general efficiency topic, I have the following question:
Assuming two tables in a one to many relationship, fully normalised, and a main form and sub form based on these tables.
The 'usual' way of linking these is to create a parent/child relationhip between the main and sub form, thereby...
So when your date needs to be DISPLAYED, you'll need to FORMAT when you load the listbox
Format(MyDate, "mm/dd'yy")
I had thought of that, but as I previously said, the listbox is populated using the .getrows method as shown in the following code
'Populate the combo if there are records...
Hi,
I have a multi-column listbox in an excel userform that is populated from a recordset (using .getrows). The recordset is from an Access database.
One of the columns in the listbox is a date field and although the date format in the Access database is DD/MM/YY (and I have verified that all...
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.