Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004

    Unanswered: drop down field in a report

    I have a bit of a problem where Im trying to display the results of a drop down in a report.

    The database contains the following info:

    Category > Mother, Alleged Father or Child are the three drop downs.

    In a subform I've linked this to a name.

    Now in the report I can manage to print out the categories and the names in the detail section, but what I want to do is put the individual names matching "Father" into another section.

    The closest I've got is the following field:

    =([Category]="Alleged Father")

    It just returns a number 0 or a -1

    I want to add the syntax to read Check query and match Category with Father and display the result.

    Any ideas?

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    it's doing what you asked!

    the expression:
    depending on the value of [Category] evaluates to FALSE (in Access = 0) or TRUE (in Access = bitwise-not-0 = -1)

    try just [Category]

    currently using SS 2008R2

  3. #3
    Join Date
    Dec 2004


    I tried the [Category] by itself, but it just prints Child (which is one of the categories.

    How is it possible to get it to view the Category and then print the childs name.

    See, on a subdatabase, the childs name is on and also the category (choice of mother, alleged father and child).

    So for example in the sub database, the name of the person is Arjan Sangha, it then click the category dropdown field and select "Child" the next record is "Jaspal Sangha" I use the dropdown again but this time click "Mother".

    What I need to do in a report is to be able to enter the following sort of details underneath a text paragraph:

    The child is: [then the childs name should appear here]

    This child is identified with: [then the mothers name should appear here]

    Hope this is more clear. Any assistance is appreciated.

  4. #4
    Join Date
    Dec 2003
    Dallas, TX
    Hi davindersangha,
    Not really sure how you have your CategoryField setup but with all of my ComboBoxes, the items selected automatically appear in my corresponding Reports. Does the ComboBox work properly in your Form? Did you base your Report on the same Query and drag the Category Field onto it? Seems you might have told it to show the First location of the ComboBox...being (0). Check the Properties for that ComboBox and if set to (0), change it to read from position (1). Check the BoundColumn setting in the Properties of the ComboBox on your Report too. (0) is the first place as Access starts with position (0) as the First and then with (1) as the Second position.
    Strange thing is you're getting only 1 of 2 results for something that has Three or more said the Report shows either (0) or (-1) being True/False. Do you have an OptionBox or CheckBox on the Report instead of ComboBox??? ComboBox won't evaluate to True/False as it displays whatever field you set it to. Anyway that's my take on your situation, or if not, Zip and Post that part of your program that is causing the trouble...i.e. Table/Query/Form/Report with Dummy data input.

    hope you have a wonderful Holiday!!!

Posting Permissions

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