Results 1 to 15 of 15
  1. #1
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224

    Unanswered: combo box problem

    i have a combo box in a form whose row source is a table call workstatus
    workstatus looks like the following
    1 open
    2 closed
    3 transferred

    when i display this in the report, it displays the numbers and not the text
    how do i get it to display the second column in the report. I tried setting it as a combo in the report and setting no of col to 2 and col widths to 0";1" but that doesnt work

    thank you

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What report? What is "the report". And what does it have to do with the form?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    tblworkorder

    wo# asset# workstatus worktype timein timeout completed

    I then run querry by asset#

    and display in a report

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    So what are you saying? You need to convert the number in workstatus to a string within the report? That has nothing to do with the form or a combo box...

    This is making the assumption that there will ALWAYS be a value of 1, 2 or 3:

    =iif(workstatus = 1, "open", iif(workstatus = 2, "closed", "transferred"))
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    workstatus is a table

    1 - open
    2 - closed
    3 - transfered

    when i chose workstatus in my form it gets stored as 1,2 or 3 in my table

    and then thats what gets displayed in the report
    i want to dislay open, closed , transferred

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Use the iif
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  7. #7
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    where wud i put it
    in the control source or somewhere else, also shud i keep the workstatus field as a combox box attached to the table or merely a text field

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    There is no combo box.

    You do not need a combo box.

    Do not worry about a combo box.

    put that iif statement in a text box.

    Do you understand what it does?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  9. #9
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    ok i make an unbound text boax and put it in, its gives me #Error

  10. #10
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    lookup "iif function" in the help text.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  11. #11
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    is your report based on a query or table?

  12. #12
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    based on a query

  13. #13
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    add the workstatus table to the query (i assume there's a link between the number field in work status and the number field in tblworkorder - if not, create one) and add the text/description field from the workstatus table to the output of the query. add this new field in place of the number field in your report.

  14. #14
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    thank you
    that did it

  15. #15
    Join Date
    Jun 2004
    Posts
    8

    Combo Box Problem

    Though you've been given the solution, in case you really have to use a combo box instead of the IIF statement, because you have so many data in the combo box, this is what I did. Do not assign the 0" width for columns you don't want to show. Assign a very thin width like .001" so you don't lose any column count.

Posting Permissions

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