Mystery 'Enter Parameter Value' pop up!

RickDB

Registered User.
Local time
Today, 12:32
Joined
Jun 29, 2006
Messages
101
Hey all,

I have been looking everywhere on a search form and its related queries / tables for a missing value / error that causes this pop up:

Enter Parameter Value
=Date()

The report opens fine once that parameter error is cleared, and I cannot find what it is refering to at all. Does Access have any tools to help me track that down instead of blindly looking at every component piece by piece and hoping to stumble upon it?

I found the code below to clear P.V. errors (I think anyway - I would rather figure out what is causing it, but after way too much time spent on it, I still have had zero luck), and I have toyed with this and am having no luck:

Private Sub Report_Open(Cancel As Integer)
On Error Resume Next

Dim ctl As Control
Dim var As Variant
Dim rst As DAO.Recordset

Set rst = CurrentDb.OpenRecordset(Me.RecordSource)

For Each ctl In Me.Controls
var = rst(ctl.ControlSource)

If Err = 438 Then ' Control has no Controlsource-property
Err.Clear
Resume Next
End If
If Err = 3265 Then ' Controlsource doesn't exist in recordsource
ctl.ControlSource = ""
Err.Clear
Resume Next
End If
Next ctl
End Sub


As always, any and all help is very appreciated!
 
Rick

Set rst = CurrentDb.OpenRecordset(Me.RecordSource)

me.recordsource refers to the recordsource of your form. if you are prompting for the date in that query, then you will be prompted for the date again when you open ther recordset. Any help?

If this is it, get round this by setting the parameter from a form or variable
 

Users who are viewing this thread

Back
Top Bottom