Ask a Question related to Microsoft Access, Design and Development.
-
Jill #1
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
-
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... -
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. ... -
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... -
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... -
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... -
SteveS #2
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



Reply With Quote

