Results 1 to 2 of 2

Thread: Crystal Report 6 & DAO .mdb

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Brooklyn,Ohio USA
    Posts
    2

    Post

    Hi, I have been creating an address book as a learning tool to learn VB5, I am balding quickly and one more day trying to figure this one out and I'll need some of that spray paint hair.
    I have downloaded the Crystal report 6 designer. I have attached and built a database named test.mdb. Test has a table called address. Address has many fields, one on them called name.
    I have built a form that allows me to enter data to and search my test database, create new address books etc... I have built a new report using the designer that lists all records in the database, works great.
    Now I want to add a button to my form that runs the report and prints just the record that is on the screen. The name field on my form is called txtName. I want to query the crystal report on this name. It works great if I create a selection formula where I specify {dao.name} = "John Smith", but only if i create this formula in the designer, I want it created at runtime.

    Like: {dao.name}=frmAddress.txtname.

    I have tried crySingleReport.SelectionFormula = "{dao.name}=John Smith"

    as part of the viewers on load property. HELP PLEASE
    Thanks in advance!
    Dan

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Try this:


    crySingleReport.SelectionFormula = "{dao.name}=" & frmAddress.txtname.Text


    It should work just fine.

    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width