Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2007, 12:41 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default "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
Reply With Quote
  #2 (permalink)  
Old March 22nd, 2007, 05:16 PM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can I ask, When you get the error, is the form LookUpCustomerform Open. If the form is Closed the code will not be able to find its value?
Reply With Quote
  #3 (permalink)  
Old March 22nd, 2007, 08:58 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The first form that opens is the "Lookupcustomerform" and after user enters the customer number in it, it opens another form. From this form, you can open another sub-form. Users get this error on any of these sub-forms. Could there be any code that I need to write? I did write one code for "OK" which mentions to close the first form and open the second one. The weird thing is that the error doesn't come everytime. it just appears pretty randomly.
Please advise.

Reply With Quote
  #4 (permalink)  
Old March 27th, 2007, 03:39 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by martinrhague
 Can I ask, When you get the error, is the form LookUpCustomerform Open. If the form is Closed the code will not be able to find its value?
The first form that opens is the "Lookupcustomerform" and after user enters the customer number in it, it opens another form. From this form, you can open another sub-form. Users get this error on any of these sub-forms. Could there be any code that I need to write? I did write one code for "OK" which mentions to close the first form which is the LookupCustomer form and open the second one. The weird thing is that the error doesn't come everytime. it just appears pretty randomly.
Please advise.


Reply With Quote
  #5 (permalink)  
Old March 28th, 2007, 11:04 AM
Registered User
 
Join Date: Oct 2006
Location: Leigh, Lancashire, United Kingdom.
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I would suggest that you create a global variable and point your forms to look at that. This way forms should always be able to get the input from your users.

Give this a try and see if it helps. Also in the query, have you set the input in the parameters field in the properties of the query. Maybe worth making sure all sub forms queries have this set?

Reply With Quote
  #6 (permalink)  
Old April 3rd, 2007, 10:47 AM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey...I created a global variable and passed values and it works great now. Haven't seen that error appear in the last 2 days. Thanks a lot for your help..:)
Quote:
quote:Originally posted by martinrhague
 Hi

I would suggest that you create a global variable and point your forms to look at that. This way forms should always be able to get the input from your users.

Give this a try and see if it helps. Also in the query, have you set the input in the parameters field in the properties of the query. Maybe worth making sure all sub forms queries have this set?

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select nodes randomly carlosaml XSLT 3 October 17th, 2007 10:18 AM
Enter Parameter Value error dominicjn Access 4 August 16th, 2007 07:17 AM
Unexpected enter parameter value lic023 Access VBA 1 March 13th, 2006 03:49 PM
Enter Parameter Value Sibrovvs Access 3 November 26th, 2004 12:57 PM
How to hide "Enter Parameter Value" screen crsytal salmaan Crystal Reports 2 April 21st, 2004 11:39 AM



All times are GMT -4. The time now is 10:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.