Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Many thanks to you for putting it together and to the forum members for taking the time to post their replies and give their time to help others. Their isn't another site that can touch it..."

Geography

Where in the world do Tek-Tips members come from?
reinaldo (Programmer)
2 Jun 01 18:33
The pushbutton method below creates an answer table so that I may print my report. ("CigApp")

I would like the Customer No field to be the string field (S String)  unfortunately when I use the tidle on Customer No and put s=Customer No  on my code it does not work.

Is this because the Customer No  field is joined, if so how can I make it work? PDOXWIN 9

I have tried just about everything now and unfortunately everyone that responds, as greatful as I am, has not given me the solution.

Thank you

method pushButton(var eventInfo Event)
Var
    R Report
    Q Query
    S String
    poi PrinterOptionInfo
endvar

if msgQuestion("Financial Designs DBS, Inc. ","Print Cigarette License?") ="Yes" then

Action(DataPostRecord)

S=Phone

Q=Query

ANSWER: :PRIV:ALLAPPS.DB

Customer.db | Customer No  | Name   | Trade Name | Street |
            | Check _join1 | Check  | Check      | Check  |

Customer.db | Zip    | Fax    | Phone    | Account Date |
            | Check  | Check  | Check~s  | Check        |

Customer.db | State ID No | Food Stamp No | Term   |
            | Check       | Check         | Check  |

Customer.db | Nature of Business | Status | Date of Inc. |
            | Check              | Check  | Check        |

Customer.db | Account No | Route  | BankTel |
            | Check      | Check  | Check   |


Allclien.db | Customer No | SS#    | Names  | Last Name |
            | _join1      | Check  | Check  | Check     |

Allclien.db | State  | Zip    | Tel    | DOB    |
            | Check  | Check  | Check  | Check  |

Allclien.db | Title                                    |
            | Check Not Contact, Not Wife, Not Husband |

EndQuery

if not executeQBE(q) then
    return
endif

poi.papersize = prnLetter
poi.orientation = prnPortrait
printersetoptions(poi)

if not r.print("CigApp") then
errorshow()
return
endif
Endif

endMethod
JoeNg (Programmer)
4 Jun 01 14:10
I am confused.
You stated you want s=Customer No
In your query, s=Phone!
So, which one is it?



vtj (MIS)
4 Jun 01 15:39
I noticed that you put the "~s" in the Phone field not the Customer NO field.  Would you let me know if this is just a typo because that will cause the program to fail.  Is the Customer No a string or a number.  If it is a number you will have to do a transform on the data or change the variable type.  

VTJ
Guest (Visitor)
4 Jun 01 18:18
OK.  I think I've worked out what you are trying to do.  Is Customer No a field on your form?.  If so, then use the code like this :

method pushButton(var eventInfo Event)
Var
    R Report
    Q Query
    S String
    poi PrinterOptionInfo
endvar

if msgQuestion("Financial Designs DBS, Inc. ","Print Cigarette License?") ="Yes" then
 Action(DataPostRecord)
 S=Customer_No.value
 Q=Query

ANSWER: :PRIV:ALLAPPS.DB

Customer.db | Customer No      | Name   | Trade Name | Street |
            | Check _join1, ~S | Check  | Check      | Check  |

Customer.db | Zip    | Fax    | Phone    | Account Date |
            | Check  | Check  | Check    | Check        |

Customer.db | State ID No | Food Stamp No | Term   |
            | Check       | Check         | Check  |

Customer.db | Nature of Business | Status | Date of Inc. |
            | Check              | Check  | Check        |

Customer.db | Account No | Route  | BankTel |
            | Check      | Check  | Check   |


Allclien.db | Customer No | SS#    | Names  | Last Name |
            | _join1      | Check  | Check  | Check     |

Allclien.db | State  | Zip    | Tel    | DOB    |
            | Check  | Check  | Check  | Check  |

Allclien.db | Title                                    |
            | Check Not Contact, Not Wife, Not Husband |

EndQuery

if not executeQBE(q) then
    return
endif

poi.papersize = prnLetter
poi.orientation = prnPortrait
printersetoptions(poi)

if not r.print("CigApp") then
errorshow()
return
endif
Endif

endMethod

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close