"Enter parameter value" occurrs randomly
Hi,
I get the "Enter parameter value" error message on a form. Its asking for a value that is used and stored correctly in the query. I'm adding the query below. I'm also attaching the performance documenter for the form. Please help.
SELECT ContractTable.ContractIDnum, ContractTable.Custnum, [Master Customer List].Name, [Master Customer List].City, [Master Customer List].ST, ContractTable.Group, ContractTable.Accord, ContractTable.BusinessUnit, ContractTable.RebateAmount, ContractTable.Notes, IIf(Date()>DateSerial(Year([enddate]),Month([enddate])+2,0),"Y") AS Exp, ContractTable.System, ContractTable.Advantage, ContractTable.BSC_Overlay, ContractTable.EPP
FROM ContractTable INNER JOIN [Master Customer List] ON ContractTable.Custnum = [Master Customer List].[Cust#]
WHERE (((ContractTable.Custnum)=[Forms]![LookUpCustomerform]![CustomerNum]))
ORDER BY ContractTable.ContractIDnum DESC;
The error asks for parameter "Forms!LookUpcustomerform!customernum".
I don't get this error everytime. It just occurs pretty randomly so I'm confused where to look.
Performance documenter:
\\stpnas01\Rebate_GPO Central\RADAR Thursday, March 22, 2007
Form: LookUpCustomerform Page: 1
Properties
AllowAdditions: True AllowDatasheetView: True
AllowDeletions: True AllowDesignChanges: True
AllowEditing: True AllowEdits: True
AllowFilters: True AllowFormView: True
AllowPivotChartView: True AllowPivotTableView True
AllowUpdating: No AutoCenter: False
AutoResize: True BorderStyle: Sizable
CloseButton: False Container: Forms
ControlBox: True Count: 4
CurrentView: 0 Cycle: All Records
DataEntry: False DatasheetBackColor: 16777215
DatasheetBorderLine 1 DatasheetCellsEffect: Flat
DatasheetColumnHe 1 DatasheetFontHeight: 10
DatasheetFontItalic: False DatasheetFontName: Arial
DatasheetFontUnderli False DatasheetFontWeight Normal
DatasheetForeColor: 0 DatasheetGridlinesBe Both
DatasheetGridlinesCo 12632256 DateCreated: 3/21/2007 1:19:36 PM
DefaultEditing: 2 DefaultView: Single Form
DividingLines: False FastLaserPrinting: True
FetchDefaults: True FilterOn: False
FrozenColumns: 1 GridX: 24
GridY: 24 GUID: {guid {778CD331-
BFB6-45CC-A2EE-
HasModule: True HelpContextId: 0
HorizontalDatasheet 1 Hwnd: 8260104
InsideHeight: 2790 InsideWidth: 5790
KeyPreview: False LastUpdated: 3/21/2007 1:19:36 PM
LayoutForPrint: False LogicalPageWidth: 9360
MaxButton: False MinButton: False
MinMaxButtons: None Modal: True
Moveable: True NameMap: Long binary data
NavigationButtons: False OrderByOn: False
Orientation: Left-to-Right Owner: admin
Painting: True PaletteSource: (Default)
Picture: (none) PictureAlignment: Center
PictureSizeMode: Clip PictureTiling: False
PictureType: 0 PopUp: True
PrtDevMode: Long binary data PrtDevNames: Long binary data
PrtMip: Long binary data RecordLocks: No Locks
RecordSelectors: False RecordsetType: Dynaset
RowHeight: Default ScrollBars: Neither
ShortcutMenu: True ShowGrid: True
SubdatasheetExpand False SubdatasheetHeight: 0
TimerInterval: 0 UserName: admin
VerticalDatasheetGri 1 ViewsAllowed: Form
Visible: False WhatsThisButton: False
Width: 7200 WindowHeight: 3495
WindowLeft: 5940 WindowTop: 1140
WindowWidth: 6210
Objects
\\stpnas01\Rebate_GPO Central\RADAR Thursday, March 22, 2007
Form: LookUpCustomerform Page: 2
Section: Detail
BackColor: 11062745 CanGrow: False
CanShrink: False DisplayWhen: Always
EventProcPrefi Detail ForceNewPag None
HasContinued: False Height: 2880
InSelection: False KeepTogether False
Name: Detail NewRowOrCol: None
SpecialEffect: Flat Visible: True
WillContinue: False
Command Button: Cancel
AutoRepeat: False Cancel: True
Caption: Cancel ControlType: 104
Default: False DisplayWhen: Always
Enabled: True EventProcPrefi Cancel
FontBold: No FontItalic: False
FontName: Times New Roman FontSize: 12
FontUnderline: False FontWeight: Semi-bold
ForeColor: -2147483630 Height: 405
HelpContextId: 0 Left: 4320
Name: Cancel OnClick: [Event Procedure]
Picture: (none) PictureType: 0
ReadingOrder: Context Section: 0
TabIndex: 2 TabStop: True
TextFontChar 0 Top: 1920
Transparent: False Visible: True
Width: 930
Text Box: CustomerNum
AllowAutoCorr True AutoTab: False
BackColor: 16777215 BackStyle: Normal
BeforeUpdate: [Event Procedure] BorderColor: 0
BorderLineStyl Solid BorderStyle: Solid
BorderWidth: Hairline BottomMargin: 0
CanGrow: False CanShrink: False
ColumnHidde False ColumnOrder: Default
ColumnWidth: Default ControlType: 109
DecimalPlaces Auto DisplayWhen: Always
Enabled: True EnterKeyBeha False
EventProcPrefi CustomerNum FilterLookup: Database Default
FontBold: No FontItalic: False
FontName: Times New Roman FontSize: 12
FontUnderline: False FontWeight: Normal
ForeColor: 0 Format: General Number
Height: 300 HelpContextId: 0
IMEHold: False IMEMode: 0
IMESentence 0 IsHyperlink: False
Mode:
KeyboardLang 0 Left: 4320
uage:
LeftMargin: 0 LineSpacing: 0
Locked: False Name: CustomerNum
NumeralShap System OldBorderStyl 1
OnClick: [Event Procedure] ReadingOrder: Context
RightMargin: 0 ScrollBarAlign System
\\stpnas01\Rebate_GPO Central\RADAR Thursday, March 22, 2007
Form: LookUpCustomerform Page: 3
ScrollBars: Neither Section: 0
SpecialEffect: Sunken TabIndex: 0
TabStop: True TextAlign: General
TextFontChar 0 Top: 420
TopMargin: 0 Vertical: False
Visible: True Width: 1440
Label: Enter Customer Number
BackColor: 16777215 BackStyle: Transparent
BorderColor: 0 BorderLineStyl Solid
BorderStyle: Solid BorderWidth: 2 pt
BottomMargin: 0 Caption: Enter Customer Number
ControlType: 100 DisplayWhen: Always
EventProcPrefi Enter_Customer_Number FontBold: Yes
FontItalic: False FontName: Tahoma
FontSize: 11 FontUnderline: False
FontWeight: Bold ForeColor: 0
Height: 300 HelpContextId: 0
Left: 1140 LeftMargin: 0
LineSpacing: 0 Name: Enter Customer Number
NumeralShap System OldBorderStyl 1
ReadingOrder: Context RightMargin: 0
Section: 0 SpecialEffect: Shadowed
TextAlign: General TextFontChar 0
Top: 420 TopMargin: 0
Vertical: False Visible: True
Width: 2760
Command Button: OK
AutoRepeat: False Cancel: False
Caption: OK ControlType: 104
Default: True DisplayWhen: Always
Enabled: True EventProcPrefi OK
FontBold: No FontItalic: False
FontName: Times New Roman FontSize: 12
FontUnderline: False FontWeight: Semi-bold
ForeColor: -2147483630 Height: 405
HelpContextId: 0 Left: 3000
Name: OK OnClick: [Event Procedure]
Picture: (none) PictureType: 0
ReadingOrder: Context Section: 0
TabIndex: 1 TabStop: True
TextFontChar 0 Top: 1920
Transparent: False Visible: True
Width: 930
Code
1 VERSION 1.0 CLASS
2 BEGIN
3 MultiUse = -1 'True
4 END
5 Attribute VB_Name = "Form_LookUpCustomerform"
6 Attribute VB_GlobalNameSpace = False
7 Attribute VB_Creatable = True
\\stpnas01\Rebate_GPO Central\RADAR Thursday, March 22, 2007
Form: LookUpCustomerform Page: 4
8 Attribute VB_PredeclaredId = True
9 Attribute VB_Exposed = False
10 Option Compare Database
11
12 Private Sub CANCEL_Click()
13 DoCmd.Close
14 End Sub
15
16
17 Private Sub OK_Click()
18 On Error GoTo Err_OK_Click
19
20
21 DoCmd.OpenForm "CustomerContractQueryForm"
22 DoCmd.Close acForm, "LookupCustomerForm"
23
24 Exit_OK_Click:
25 Exit Sub
26
27 Err_OK_Click:
28 MsgBox Err.Description
29 Resume Exit_OK_Click
30
31 End Sub
User Permissions
admin Delete, Read Permissions, Set Permissions, Change Owner,
Read Definition, Modify Definition, Execute
Group Permissions
Admins
Users Delete, Read Permissions, Set Permissions, Change Owner,
Read Definition, Modify Definition, Execute
|