If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Assign Variable

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-11, 18:26
ilfoprog ilfoprog is offline
Registered User
 
Join Date: Nov 2011
Posts: 3
Assign Variable

Hello. In my access vba code I am trying to change a hard coded drive to a textbox value assigned to a variable.

I would like to change this;
DeleteFiles "s:\APLINKED\", "", DateAdd("d", -10, Date)

to something like this;

varFrmDrv = Me.frm_entfname_path
DeleteFiles varFrmDrv & "APLINKED\", "", DateAdd("d", -10, Date)

Where s:\ can now be c:\ or whatever drive letter is entered in the text box "frm_entfname_path"

Thank you.
Reply With Quote
  #2 (permalink)  
Old 11-22-11, 21:52
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
So other than specify that you want the text property of Me.frm_entfname_path what are you missing?

Where are you having problems. Your approach seems pretty straight forward to me.
Reply With Quote
Reply

Tags
access, microsoft, vba

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On