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

object pal code

Status
Not open for further replies.

reinaldo

Programmer
Mar 29, 2001
31
US
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
 
I am confused.
You stated you want s=Customer No
In your query, s=Phone!
So, which one is it?



 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top