Mark -
Glad to hear this; thanks.
Now, for you, Ray, et al:
Having resolved the case sensitivity issue, the programming I am using now works UP TILL the point of actually printing the envelopes.
It sorts, retrieves and loops through all of the selected record set but then it does
NOT print!
I am wondering whether it has to do with the placement of the "Else Stop" code (although I tried it in another location in relation to the ending brackets, with no better result). This is supposed to execute only when the user answers "no" to the askuser question. (When no is answered it does stop, as I want it to).
But when yes is answered, as I said, it does go through the entire process except for the printing.
var Z as int
var SaveRecord as Int
var SearchMode as Int
var LoadSort as Int
var LoadRetrieve as Int
Var DoRetrieve as Int
Var vCnt as Int
Var vLoop as Int
Var vTimes as Int
vLoop = 0
vTimes = 0
if not @update then
{
z = @asynchshell("C:\Program Files\Sesame\Data\Sounds\Cannot Use Here.wav")
STOP
}
else
If @Mode() <> 0 Then
{
SaveRecord = @SelectTreeItem("Search Update Menu!Navigation!Save Record")
SearchMode = @SelectTreeItem("Search Update Menu!Search (F7)")
LoadSort = @LoadSortSpec("Alphabetical by Last Name")
LoadRetrieve = @LoadRetrieveSpec("Paid Subscribers")
DoRetrieve = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")
If DoRetrieve = 1 Then
{ If @Askuser("You are about to print", @ResultSetTotal() + " envelopes","Do you want to do this?")
Then
{
While ((vCnt = 0) And (vTimes < 10))
{
vTimes = vTimes + 1
Loiter(1000)
vCnt = @FormResultSetTotal("Middle Villagers")
}
Writeln(vCnt + " Total Records")
While (vLoop < vCnt)
{
vLoop = vLoop + 1
FormResultSetCurrentPosition("Middle Villagers", vLoop)
writeln("Record Number " + vLoop + " prints an envelope for " + Mail Name)
}
Writeln("Done Looping")
FormResultSetCurrentPosition("Main Form", 1)
}
Else STOP
}
AlternateDefaultPrinter("Envelopes")
PrintPagePaper(20)
Newpage(950,412)
PrintString("Herbert Teicher", 30, 25, 0, "Arial", 14, 0)
PrintString("26 McDonald Street", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Staten Island, NY 10314-5055", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString(Mail Name, 450, 200, 0, "BArial", 16, 0)
PrintString(Street Address + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0)
PrintString(City + ", " + State + " " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0)
PrintString("Thanks for supporting The Middle Villager Newsletter", 30, 355, 0, "IArial", 12, 0)
FinishPage()
}
This is the last step I need to address in order for my command button to be fully functional.
HELP!!!!