Tezcatlipoca
Registered User.
- Local time
- Today, 23:03
- Joined
- Mar 13, 2003
- Messages
- 246
Hi all,
I have a small search engine written in VB with Access forms. The engine works perfectly and produces a list of all files (filtered by dropdown boxes on the form) in a particular folder.
Now what I want to do is have a series of three separate text boxes - unbound - on the main form, that gives data about the selected file. I know that for this I need to add code to the OnClick event of my search results.
The three components of every file are:
1) A leading code, of the format "XX000 - "
2) A filename of variable length
3) An extension of the standard format ".XXX"
My first and last boxes are easy to do. The OnClick event of my search results box looks like this:
When I click on a file in the list, the code text box, TxtDataCode, fills out with the 5 character code.
At the same time, the extension box, TxtFileType, fills out with the file extension.
The problem is the variable name. I know I can use:
and the filename box, TxtDataName, fills out from where the filename properly starts, but it still has the extension on the end. Try as I might, I can't find a way to remove that damn extension.
Please help!
I have a small search engine written in VB with Access forms. The engine works perfectly and produces a list of all files (filtered by dropdown boxes on the form) in a particular folder.
Now what I want to do is have a series of three separate text boxes - unbound - on the main form, that gives data about the selected file. I know that for this I need to add code to the OnClick event of my search results.
The three components of every file are:
1) A leading code, of the format "XX000 - "
2) A filename of variable length
3) An extension of the standard format ".XXX"
My first and last boxes are easy to do. The OnClick event of my search results box looks like this:
Code:
Private Sub LstFoundFiles_Click()
Me.TxtDataCode = Left(Me.LstFoundFiles.Value, 5)
Me.TxtFileType = Right(Me.LstFoundFiles.Value, 4)
End Sub
When I click on a file in the list, the code text box, TxtDataCode, fills out with the 5 character code.
At the same time, the extension box, TxtFileType, fills out with the file extension.
The problem is the variable name. I know I can use:
Code:
Me.TxtDataName = Mid(Me.LstFoundFiles.Value, 9)
and the filename box, TxtDataName, fills out from where the filename properly starts, but it still has the extension on the end. Try as I might, I can't find a way to remove that damn extension.
Please help!