Fixed
Ah I wasn't, I was using:
ArrayList TrackList = new ArrayList();
But now I've added the <Track> bits it works, many thanks!
User Profile
Collapse
-
Returning custom objects from an ArrayList
Hi,
I have one class called Track and another class called TrackList. TrackList is an ArrayList made up of Track objects. I can add Track objects to a TrackList but I cannot retrieve them as actual Track objects from the ArrayList, I can only retrieve them as generic objects. This means that I cannot use any methods from the Track class on them.
How can I get Tracks out of a TrackList as actual Track objects?
... -
Many thanks both Stewart and smartchap,
Yeah the things I thought were spaces were ascii 0 (null i think?).
I added a for loop so if
asc(right(title ,1)) = 0 then
title = left(title, len(title)-1)
else
exit for
end if
the program works perfectly now, thanks again!Leave a comment:
-
I tried using the right$() function and it doesn't recognise space as a space.
I've attached the project folder but it won't let me upload any zipped mp3 files (even tiny ones ~300kb). Any mp3 file can be used as long as it has something in the title field....Leave a comment:
-
RTrim/Concatenatate problem
Hi,
I have a program which extracts 30 characters from a specific point in a file and performs an rtrim function on it to remove any spaces on the right of the text. After this a concatenate function adds a folder path before the extracted text and a ".mp3" extension after the extracted text thus creating a full filepath. A working example of this process would be: extracted text = "song 1 ".... -
-
Extract specific text fragment from (music) file
Hi,
I am trying to write a program that will rename music files, with the new file name coming from the value stored in the music file's 'title' id3 tag. I have found a lot of code for editing and writing all of the id3 fields but it is overly complicated for what I want to do.
My current thoughts are to write a procedure that extracts the last 125 to 95 characters of the music file, which is where the title tag is always... -
Cheers NeoPa and puppydogbuddy, the URL field was set to Yes (No Duplicates). But I don't understand why that caused the problem because the query should overwrite the URL field regardless of what data it contains shouldnt it?...Leave a comment:
-
SQL Update Key Violation
Hi, I am trying to run an SQL update query but out of the 9 records it should be updating, it updates one and then says: "Database can't update all the records in the update query. 8 fields weren't updated due to key violations". The SQL statement is below:
Code:DoCmd.RunSQL ("UPDATE [Track] SET [digital] = False, [URL] = '', [Valid Path] = False WHERE [Artist] LIKE [Artiststore] AND [Album] LIKE [Albumstore]")
-
-
Searching for a blank field in an SQL statement
Hi, im trying to run an update SQL statement which sets the flag (queryident) to ticked if the track title field in that record is blank. However using '' to indicate a blank field does not work. Any ideas? The statment is below.
Code:DoCmd.RunSQL ("UPDATE [TRACK] SET [QueryIdent] = True WHERE [Track Title] = ''")
-
I have tried all three of the ways you suggested, but the same problem keeps occuring. This is where only the last search results are displayed in each list box. I think im putting the code in the right place i.e. in the else part of the "If fs.FoundFiles.C ount = 1 Then" statement. Is it to do with a property on the actual list box?...Leave a comment:
-
Listbox Do Loop problem...
Hi, I have a list box (called genredelete) and i'm trying to write a procedure to delete all the selected items in the list box. The code i have written to do this is as follows:
Code:Dim indexnum As Integer indexnum = 0 Do Until indexnum = GenreDelete.ListCount If GenreDelete.Selected(indexnum) = True Then
-
Code:Do Until Form.CurrentRecord = CountDisplay 'slashfrontpos = InStrRev(URL, "\") 'URLLength = Len(URL) 'slashbackpos = URLLength - slashfrontpos 'Extract = Right(URL, slashbackpos) 'pointfrontpos = InStrRev(URL, ".") 'URLLength = Len(URL)
Leave a comment:
-
Cheers JKing, that part of the problem is now fixed. As a follow-problem I said if there were multiple files found I wanted the file paths added to a list box. I kind of managed to do this but have a problem. I set up the form so each record has a list-box. The list box isn't attached to a field or anything its just there for when there are multiple search results. The problem I'm having is that if for example a search of five files produced two...Leave a comment:
-
Converting a foundfile string to a text box string
Hi, i have a form which displays records containing a filepath field. When a button is pressed all the filepath fields are checked and the form is refiltered to display only those with invalid file paths. Upon pressing a second button each file is searched for on the computer. Currently all the matches are just written to a list box. What i want to happen is if there is only one match then that match's file path is written to the record's file path... -
Thanks alot! The examples the access help gives are very limited....Leave a comment:
-
Problem With Multiple Form Filters
Hi, I have a form that loads with a filter:
Code:Me.Filter = "Format = 'Digital'" Me.FilterOn = True
-
-
Procedure to insert new text from combo box into a table
Hi, I have an "Add New Records To Table" form. In the header of the form there is a combo box (artistsource) which looks up values from a different table (Artist), the value selected by the user is set as the default value for one of the fields on the records. The user isn't restricted to the data in the artist table and may type in a new artist. What I am trying to code is that when the user closes the form, if the user typed in a new...
No activity results to display
Show More
Leave a comment: