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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Merge (\ or \\)

Status
Not open for further replies.

Persmd

Programmer
May 21, 2003
38
0
0
US
I am working on an application, using VFP 8.0

The text merge commands \ and \\ allow the printing or displaying of text from within a program.

My problem is that my application uses a dropdown Combo box to list all (including network) printers that are available to the user.

I use an array for the Combo box, and populate the array with: APRINTERS(prt_list).

The array contains:
prt_list(1,1) = "\\Servername\HP OfficeJet G Series"
prt_list(1,2) = "DOT 4_001"
etc.

The problem is that when the Combo box is viewed in the application, this printer appears as "\Servername\HP OfficeJet G Series" (single leading back slash), and it is grayed out, and apparently not available.

Any ideas on how I can let VFP know that the double back slash "\\" is part of the print server name, and is not the lead into a text merge?

Michael
 
While I have no idea why Fox ate one \ from this string, I just know how to fix it.
Just add another prt_list(1,1) = "\\\Servername\HP OfficeJet G Series"
ComboBox.Value (believe me) will return the correct string with 2 \\ not 3

What is going on here??? I have no idea


Walid Magd
Engwam@Hotmail.com
 
Thanks Walid, I will give that a try. It was on my list of things to try. So, I'll try it now.

Michael
 
Walid and Dave,

I did try the triple backslash, and it did show up in the dropdown properly (with 2 back slashes), but it's still disabled.

Back to the drawing board.

Michael
 
Hi Michael.

>> The problem is that when the Combo box is viewed in the application, this printer appears as "\Servername\HP OfficeJet G Series" (single leading back slash), and it is grayed out, and apparently not available. <<

Put a space in front of the first back slash in the array.





Marcia G. Akins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top