Format for using a variable with quotation marks 
Author Message
 Format for using a variable with quotation marks

Using Access 97
I have the following Call to SHELL, which correctly opens the file
specified.

 Call SHELL("NOTEPAD.EXE  c:\sample1.txt", 1)

Now, is if it is possible, I would like to know the format for opening
the file if
the path is a variable, and  specified in the field of each record.
Say the field is called [FileToOpen], I'm after something like:

 Call SHELL("NOTEPAD.EXE & [FileToOpen]", 1)

but of course the above doesn't work since it looks for the literal
file name: '& [FileToOpen]' rather than the value in the field.

Thanks for any help
Van Cox



Sun, 02 Jul 2000 03:00:00 GMT  
 Format for using a variable with quotation marks

Call SHELL("Notepad.exe " & Variable & ".txt", 1)
or
Call SHELL("Notepad.exe " & Me!File,1)
(same thing really)
Or even this,

Dim StrShell as String
StrShell = "Notepad.exe " & Variable
Call Shell(StrShell,1)

Quote:

>Using Access 97
>I have the following Call to SHELL, which correctly opens the file
>specified.

> Call SHELL("NOTEPAD.EXE  c:\sample1.txt", 1)

>Now, is if it is possible, I would like to know the format for opening
>the file if
>the path is a variable, and  specified in the field of each record.
>Say the field is called [FileToOpen], I'm after something like:

> Call SHELL("NOTEPAD.EXE & [FileToOpen]", 1)

>but of course the above doesn't work since it looks for the literal
>file name: '& [FileToOpen]' rather than the value in the field.

>Thanks for any help
>Van Cox



Sun, 02 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Putting a quotation mark into a variable

2. Guessing what type of quotation marks were used in the document

3. quotation marks

4. Sendkeys and Quotation Marks (")

5. TransferText and Quotation Mark Problems

6. macro to put text in quotation marks

7. Quotation Marks Problem

8. Quotation marks inside strings

9. Quotation Marks in MailMerge

10. quotation marks in a string?

11. Quotation marks

12. Help - quotation mark in text file

 

 
Powered by phpBB® Forum Software