Strings

ddrew

seasoned user
Local time
Today, 17:41
Joined
Jan 26, 2003
Messages
911
Hi, looking for some help with a string. I have populated a combobox with a list of file names by getting it to look at a directory. When I choose one of the files, the name is put into a text box, (me.BackUpName).

I also have a btn_Restore, I now want to copy the file and restore it to a different directory.

I have written the string, but its not right, I think the first part is fine but its the reference to the textbox that I dont have right or the join between the Directory and the textbox with the filename to be more precise.

My code is below

Code:
Dim sSource As String    'The name of the file to be copied

    sSource = "C:\Gundog Training Databases\BackUp\me.BackUpName"
 
Hi, looking for some help with a string. I have populated a combobox with a list of file names by getting it to look at a directory. When I choose one of the files, the name is put into a text box, (me.BackUpName).

I also have a btn_Restore, I now want to copy the file and restore it to a different directory.

I have written the string, but its not right, I think the first part is fine but its the reference to the textbox that I dont have right or the join between the Directory and the textbox with the filename to be more precise.

My code is below

Code:
Dim sSource As String    'The name of the file to be copied
 
    sSource = "C:\Gundog Training Databases\BackUp\me.BackUpName"

Code:
sSource = "C:\Gundog Training Databases\BackUp\" & me.BackUpName
 

Users who are viewing this thread

Back
Top Bottom