Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Exclamation Unanswered: Help on dialogue boxes plz!!

    hey people how u doin,

    well im not too bad cuz....i have a poblem wid my database!!!!

    well basically ive made a dialogue box (fdlgSelectMainAuthor) and by clicking on an author from the list box within the dialogue box and then clicking on the 'Preview Report' button it should view details of that particular author selected....

    and the report is blank...its showing no details or nuthin!!!


    the query linked with the dialogue box is (qrySelectMainAuthor) and the report linked with it is (rptMainAuthors)..


    can anyone help solve my problem pleae?!

    attachment included!
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2004
    Posts
    13
    The reason ur report is returnin nuthin is due to the name of the listbox control. which you have named 'Name'

    So when you reference the control from the query its actually returning the Name of the form!! which will never match with an author (unless you have an author called 'fdlgselectmainauthor' ) !!

    tis never a good idea to name controls like this as it causes this kinda problem. I have renamed the control to lstName and changed the reference in the query and voila it works.

    I never like referencing form controls in queries, ends up really messy. I always prefer to build a query that returns all the data, then when opening with report passing the criteria in the Where clause of openReport method.

    This way you can also make it more powerful, you can change the listbox control to 'multi select' and create an IN('author1','author2') clause and pass that straight into the report. So the user can choose one or more authors to run the report for. but I'll let you work it out yerself, if you even need that functionality.

    With your current design there is no way to allow this.

    attached is the fixed copy (without the mulit select thing)
    Attached Files Attached Files
    no need to panic - its just 1's and 0's

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Cool

    Next time don't name any object as Name

    I changed it to List_Names

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by hammbakka
    Next time don't name any object as Name

    I changed it to List_Names
    Here is the your solved problem
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2004
    Posts
    2
    hey thnx for that! . i really appreciate it!


Posting Permissions

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