Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable in a Function Declare

Status
Not open for further replies.

DBAchick

Programmer
Apr 27, 2000
61
Is it possible to set a variable and have it as part of a Declare statement?<br><br>My Declare Statement points to a file in a specific directory on a server named mapser1.&nbsp;&nbsp;It looks like this:<br><br>Declare Function UserRead Lib &quot;\\mapser1\appmed$\source\hal\xlfutl32.dll&quot;<br><br>I need the 'med' in appmed$ to be a variable.&nbsp;&nbsp;It will always be 3 other letters, but those three letters are not known until the database is opened and the letters are entered into a field on a form.<br><br>Is this possible or am I breaking the laws of programming.
 
i think you can do that, althought i haven't tried it yet...<br><br>but you can set a string variable and put its value within the declare statement.<br><br>dim strMyVar as string<br><br>strMyVar = &quot;something here&quot;<br><br>Declare Function UserRead Lib &quot;\\mapser1\app&quot; & strMyVar & &quot;med$\source\hal\xlfutl32.dll&quot;<br><br>Hope this will help YOU,<br><br><br><br> <p>Mohamed Aly<br><a href=mailto:samara_79@hotmail.com>samara_79@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top