Forms and Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trose178
    New Member
    • Jul 2008
    • 2

    Forms and Reports

    For starters I am not very familiar with Access or VBA, but I am working on a checklist database for my work.

    What I want to do is have a form linked to a table of questions I have. The table of questions has a few fields based on what type of questions they are.

    I want to be able to use the form to sort the questions by certain categories then be able to check off which questions you would like in the report.

    If you would like some more information let me know, I could even upload what I have currently so you can get an idea of what I'm talking about.
  • PianoMan64
    Recognized Expert Contributor
    • Jan 2008
    • 374

    #2
    In response to your comments made, you would need to post what you have so far and ask the question(s) that you need answered. Because we don't have any idea at all what it is that you're trying to do and the exact results that you're looking for, we can't answer anything until you ask the question of what it is that you want.

    Post any Table structures/ Queries/ Reports that you already have, and show examples of what you want the result to be.

    This would make it a great deal easier to try to solve instead of us just simply taking a wild guess as to what you're question is that you need answered.

    Thanks,

    Joe P.

    Comment

    • trose178
      New Member
      • Jul 2008
      • 2

      #3
      I figured this would be the case, but at the point I was not exactly sure what direction I was heading I was just speaking in generalities. I do now have a more direct question that could be answered that I have also posted on a newsgroup. Here is my dilemma:

      I am working on a multi-select list box for a standard
      question checklist database and I am running into a syntax error in
      the code that I cannot seem to correct. I will also note that I am
      using Allen Browne's multi-select list box for a report as a guide. I
      should also note that my access skills are not the best so I may need
      some explaining on certain things.

      First let me give some background on the database:
      I have a query titled Questions By Category that has the following
      fields in it
      Categories.ID
      Standard Questions.SubCa tegory1
      Standard Questions.Quest ion

      I played around with the code a little bit to make sure all fields
      were changed to match my database, but I am running into a syntax
      error 3075 on the following line:

      Code:
        strWhere = "[ID] IN (" & Left$(strWhere, lngLen) & ")"
      I searched around a little bit on here, but couldn't really find
      anything that matched this same problem. If anyone could advise I'd
      greatly appreciate it. If any additional information is needed please
      do not hesitate to ask.

      Comment

      • PianoMan64
        Recognized Expert Contributor
        • Jan 2008
        • 374

        #4
        Originally posted by trose178
        I figured this would be the case, but at the point I was not exactly sure what direction I was heading I was just speaking in generalities. I do now have a more direct question that could be answered that I have also posted on a newsgroup. Here is my dilemma:

        I am working on a multi-select list box for a standard
        question checklist database and I am running into a syntax error in
        the code that I cannot seem to correct. I will also note that I am
        using Allen Browne's multi-select list box for a report as a guide. I
        should also note that my access skills are not the best so I may need
        some explaining on certain things.

        First let me give some background on the database:
        I have a query titled Questions By Category that has the following
        fields in it
        Categories.ID
        Standard Questions.SubCa tegory1
        Standard Questions.Quest ion

        I played around with the code a little bit to make sure all fields
        were changed to match my database, but I am running into a syntax
        error 3075 on the following line:

        Code:
          strWhere = "[ID] IN (" & Left$(strWhere, lngLen) & ")"
        I searched around a little bit on here, but couldn't really find
        anything that matched this same problem. If anyone could advise I'd
        greatly appreciate it. If any additional information is needed please
        do not hesitate to ask.
        the correct syntax for that is as follows:

        Code:
         strWhere = "[ID] = " & <<Variable that holds the category ID>>
        Just make sure that you have a place to keep the variable of the Category ID and replace "<<Variable that holds the Category ID>>" with that variable name.

        Example:

        Code:
        strWhere = "[ID]=" & me.CategoryID
        If it is a string then the following syntax applies:

        Code:
        strWhere = "[ID] = '" & me.CategoryID & "'"
        Hope that helps,

        Joe P.

        Comment

        Working...