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

Paradox field filter?

Status
Not open for further replies.

OldQuail

Technical User
Feb 5, 2001
3
US
I would like to use some kind of filter for a first name field that would allow me to filter out persons that have the title "Mr." or "Miss" or whatever, only one at a time, when printing out mailing labels. How can this be done?
Thank you,
Robert White
 
I would use a query to accomplish this. Base your mailing label report on an answer.db table and then query to exclude the records you want before running the report with query variable.

{Pushbutton code}
Code:
var
qVar   query
exVar  string
r      report
endvar

exVar = object.value ;{radio button or list, or something}

qVar = 

Query

 :myalias:mytable.db | Title         | Name  | Address |
                     | Check, ~exVar | Check | Check   |

EndQuery

if not qVar.executeQBE(":priv:Answer.db")
   then errorShow()
endif

if not r.load(":myAlias:MyLabelReport",WinStyleDefault+WinStylehidden)
    then errorshow()
endif

if not r.print()
    then errorshow()
endif

if not r.close()
    then errorshow()
endif

Hope this helps,

Mac
 
After reading your post again, I realized that you might have the "miss, mr., etc" in the same field with the name. If that's the case, change the following in the above code.

exVar = object.value
;{radio button or list, or something - test for blank!}

to

exVar = object.value+".."



Mac
 
Man, I missed my coffee this morning. The query should read:

Code:
Query

 :myalias:mytable.db | Title             | Name  | Address |
                     | Check, not ~exVar | Check | Check   |

EndQuery
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top