11-29-2006, 10:39 AM
|
#1
|
|
Registered User
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
Form Name Argument???
Hi everyone,
this is my coding for a pivot table, and everytime i got put in my required dates, i get an error stating "The action or method requires form name argument" I know you cant tell much from looking at my code, but would you know ehre my problem could possibly be?
Thank in advance
If (Forms!frmHome!AirCmpOption = 12) Then
Dim fst1 As PivotFieldSet
Dim frm1 As String
DoCmd.OpenForm pvcAirCmp1LoadCus, acFormPivotTable, "", "[qryAirComprs]![fldDATE] Between [Forms]![frmHome]![AirCmpStartDate] And [Forms]![frmHome]![AirCmpEndDate]", acNormal
DoCmd.Maximize
With frml.PivotTable.ActiveView
Set frml = Forms.Item(pvcAirCmp1LoadCus)
Set fst1 = .FieldSets("[fldDATE By Month]").Field("Months")
.RowAxis.InsertFieldSet fst1
End With
End If
|
|
|
11-29-2006, 10:47 AM
|
#2
|
|
Registered User
Join Date: Jun 2005
Location: Ontario, Canada (formerly Cardiff, Wales.)
Posts: 1,019
Thanks: 0
Thanked 0 Times in 0 Posts
|
Try
Code:
DoCmd.OpenForm "pvcAirCmp1LoadCus", acFormPivotTable, "", "[qryAirComprs]![fldDATE] Between [Forms]![frmHome]![AirCmpStartDate] And [Forms]![frmHome]![AirCmpEndDate]", acNormal
|
|
|
11-30-2006, 03:49 AM
|
#3
|
|
Registered User
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
hey, thanks alot, that got rid of myerror, but now im getting a new one saying "object required" what can i do about that?
|
|
|
11-30-2006, 04:49 AM
|
#4
|
|
Registered User
Join Date: Jun 2005
Location: Ontario, Canada (formerly Cardiff, Wales.)
Posts: 1,019
Thanks: 0
Thanked 0 Times in 0 Posts
|
I think it's because you don't need the double-quotes if you don't have a filter. As long as thr right number of commas are present, a space is fine e.g.
Code:
DoCmd.OpenForm pvcAirCmp1LoadCus, acFormPivotTable, , "[qryAirComprs]![fldDATE] Between [Forms]![frmHome]![AirCmpStartDate] And [Forms]![frmHome]![AirCmpEndDate]", acNormal
instead of
Code:
DoCmd.OpenForm pvcAirCmp1LoadCus, acFormPivotTable, "", "[qryAirComprs]![fldDATE] Between [Forms]![frmHome]![AirCmpStartDate] And [Forms]![frmHome]![AirCmpEndDate]", acNormal
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
All times are GMT -8. The time now is 10:05 PM.
|
|