Form --> report problem

Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Form --> report problem

    I have a button in a form that will ask for a keyword,
    store it in strFilter and use it to generate a report,
    the code as as following (grpField is a option group with
    checkboxes ranging from 1 to 6)

    ------------------------------------
    Private Sub CmdPreview_Click()
    Dim strFilter As String
    If Not IsNull(Me.txtWot2Find) Then
    Select Case Me.grpField

    Case 1
    If IsNumeric(Me.txtWot2Find) Then
    strFilter = "Project No = " & Me.txtWot2Find
    Else
    MsgBox "Invalid Project No."
    End If
    Case 2
    strFilter = "Project Title Like ""*" &
    Me.txtWot2Find & "*"""

    Case 3
    strFilter = "Company Like ""*" & Me.txtWot2Find
    & "*"""

    Case 4
    strFilter = "Drawing Title Like ""*" &
    Me.txtWot2Find & "*"""

    Case 5
    strFilter = "Revision Like ""*" & Me.txtWot2Find
    & "*"""
    Case 6
    If IsNumeric(Me.txtWot2Find) Then
    strFilter = "Box No = " & Me.txtWot2Find
    Else
    MsgBox "Invalid Box No."
    End If


    End Select

    DoCmd.OpenReport "FR", acViewPreview, ,
    strFilter
    End If

    End Sub

    ----------------------

    when i enter the keyword and submit it, i get the
    following error:
    "438: object doenst support this property or method" ...
    and it stops on the line "Select Case Me.grpField", are
    there any errors? Any help would be appreciated! thanks

    Jill
    Jill Guest

  2. Similar Questions and Discussions

    1. Form builder,report writer and user-menu etc
      Subject: Form builder,report writer and user-menu etc Current O.S: SCO Unix Openserver 5.04 Current Informix SE 7.20 UD2 Moving to: SuSe Linux...
    2. report builder problem
      We have the developer version of CFMX7 and CF report builder on several PCs. On one of the PCs, we can't set up an RDS server in report builder. ...
    3. problem with PDF::Report and images (uses PDF::API2)
      Hi all, I'm trying out some PDF modules and have had some success with PDF::Report...
    4. use form to enter report criteria
      I'm using a form to enter report criteria with a combo box for badge and date. Is there a way to leave the badge blank if I don't want to reduce...
    5. How to link 3 different combo boxex in a form (as report criteria) to the report
      I would like to use 3 combo boxes in a form as parameter criteria for a report. When I open a report, there will be a pop up form with 3 combo...
  3. #2

    Default RE: Form --> report problem

    Jill,

    Check to make sure the option group *really is* named
    grpField. Open the form in design mode, click on the frame
    around the option group and select properties. Click on
    the "Other" tab. What does the Name line show?

    Also, to keep from trying to open a report with no data,
    you might add:

    If Len(Trim(strFilter)) > 0 then
    DoCmd.OpenReport "FR", acViewPreview, , strFilter
    Else
    MsgBox "Invalid keyword. Please try again"
    Me.txtWot2Find = Null
    Me.txtWot2Find.SetFocus
    End If

    >-----Original Message-----
    >I have a button in a form that will ask for a keyword,
    >store it in strFilter and use it to generate a report,
    >the code as as following (grpField is a option group with
    >checkboxes ranging from 1 to 6)
    >
    >------------------------------------
    >Private Sub CmdPreview_Click()
    >Dim strFilter As String
    >If Not IsNull(Me.txtWot2Find) Then
    > Select Case Me.grpField
    >
    > Case 1
    > If IsNumeric(Me.txtWot2Find) Then
    > strFilter = "Project No = " & Me.txtWot2Find
    > Else
    > MsgBox "Invalid Project No."
    > End If
    > Case 2
    > strFilter = "Project Title Like ""*" &
    >Me.txtWot2Find & "*"""
    >
    > Case 3
    > strFilter = "Company Like ""*" & Me.txtWot2Find
    >& "*"""
    >
    > Case 4
    > strFilter = "Drawing Title Like ""*" &
    >Me.txtWot2Find & "*"""
    >
    > Case 5
    > strFilter = "Revision Like ""*" & Me.txtWot2Find
    >& "*"""
    > Case 6
    > If IsNumeric(Me.txtWot2Find) Then
    > strFilter = "Box No = " & Me.txtWot2Find
    > Else
    > MsgBox "Invalid Box No."
    > End If
    >
    >
    > End Select
    >
    > DoCmd.OpenReport "FR", acViewPreview, ,
    >strFilter
    >End If
    >
    >End Sub
    >
    >----------------------
    >
    >when i enter the keyword and submit it, i get the
    >following error:
    >"438: object doenst support this property or method" ...
    >and it stops on the line "Select Case Me.grpField", are
    >there any errors? Any help would be appreciated! thanks
    >
    >Jill
    >.
    >
    SteveS Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139