Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combo box syntax (win 2000 acc 97)

    First of all, I'd like to thank Hans and Tom for helping me get this far. As you can see with the
    attached, I incorporated both of your suggestions. Thank you so much.
    The attached is very basic. Threw it together to show what I am trying to accomplish.
    If you open the form, and fill in:
    Client: AB
    Report: Weekly Open Requests
    Monday: 04/06/2003 (it's actually a sunday, but that's OK)
    Click Report.
    Report opens with proper info.
    Requests Open as of: 4/6/2003

    Priority1 4
    Priority2 3
    Priority3 5

    Total Open 12
    Perfect.

    What I need to do, (and the boss insists on keeping the combobox) is add a selection to the
    combobox that represents SI,SM & SW and call it SHC
    I need the user to able to click the selection SHC, and the query will run based on all 3 groups.
    And the report header would read SHC.

    I was thinking (pseudocode):
    If [Forms]![frmevts]![cboIPA] = SHC then IPA criteria = In (SI,SM,SW) Else IPA criteria = [Forms]![frmevts]![cboIPA]

    I know I have seen something on the board here similar, but Mr. Searchy didn't find it for me.

    If anyone can just point me to the thread, or where to look in the Help files, I'd appreciate it.

    And by the way Tom, I used to live in Davis when I first moved here from NY !! Population there has
    increased by 50% since I left 6 years ago!!

    Charlotte - so when is the next Sacramento support group for support group addicts? <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

    Thanks once again to Tom and Hans for getting me this far.

    Michael
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Combo box syntax (win 2000 acc 97)

    What you can do is to build the WHERE clause for the OpenReport statement using basically your pseudocode.
    Take the criteria out of the query.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combo box syntax (win 2000 acc 97)

    Apart from what Pat mentioned, you will need to:
    - Remove the parameter referring to cboIPA from the query
    - Change the control source of the text box in the report header to refer to cboIPA
    See attached modified version.

    PS Why did you specify "acc 97" in the subject? The database you attached is in Access 2000 format.
    Attached Files Attached Files

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box syntax (win 2000 acc 97)

    Thanks patt and Hans. I just got in to work, and I'm a little backed up. But I will
    get to work on this shortly. I am extremely appreciative of your help.

    Hans - I was working at home last night and forgot that I have acc2000 on my home computer as
    opposed to 97 at work. Sorry for any confusion <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

    Thanks so much!! I'll post back after lunch with the (positive) outcome !!

    Have a great day !!
    Michael

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combo box syntax (win 2000 acc 97)

    Thank you very much guys. Of course it works perfectly. I guess I was kinda close ?

    What I'd like to know is, what more can I do as far the help files are concerned?
    They are a good resource, but leave a lot to one's own devices! Even the MSKB is a great
    resource, but I'm beginning to wonder if I should learn better 'search word' skills ! There's been
    times when I have searched the MSKB, couldn't find the answer, and then lo and behold, a
    forum poster posts the MSKB # !!

    For example, I have spent WAY too much time sometimes, figuring out how many quotes (single/double)
    to use, and where to use them. Is there a resource (book or online) that has a good primer for these
    types of issues? I guess what I'm saying, is that I really appreciate the help here, but I would like
    to save only the "impossible" ones to actually post here. You folks are so nice to take time from your busy days
    to help us out. I hope I can return the knowledge to others someday. (Once in a while I'll post an answer
    here - along with a couple of other boards. And if it's something I got from another poster, I try my best
    to give him/her credit!)

    OK - enough rambling - I am off to finish the final details on this project.

    Thank you all very much for your patience , knowledge and contributions.

    Michael Abrams
    Sacramento, CA

Posting Permissions

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