2455 Error - One Particular Computer (1 Viewer)

gromit

Registered User.
Local time
Today, 05:41
Joined
Nov 17, 2005
Messages
260
Hi -

I have a form used to enter criteria for display of records on a subform. There is a refresh procedure that is used to update the subform. This procedure is called on load as well as after changing any of the criteria.

This has worked fine on multiple computers running both Access 02 and 03. However, one of my clients has a machine that seems to choke on this procedure. I get the following error message -

"2455: You entered an expression that has an invalid reference to the property Form/Report"

The procedure called is:

Private Sub RefreshSubform()
Dim strSQL As String
strSQL = "SELECT * FROM qryProjectsCases"

If Not (IsNull(BuildFilter)) Then
strSQL = strSQL & " WHERE " & BuildFilter
End If

' Me.frmsubProjCases.Form.RecordSource = strSQL
' Me.frmsubProjCases.Form.Requery

Forms!frmCaseList!frmsubProjCases.Form.RecordSource = strSQL
Forms!frmCaseList!frmsubProjCases.Form.Requery

End Sub

The error occurs at the line where I try to set the record source property for the subform. Note there are two commented lines, this was the original code and experienced the same error. Both methods of referencing the form generate the same error (on this one particular machine - both work on the other machines).

The function BuildFilter generates a SQL string based on the various criteria on the main form. I have even tried setting SQL to a constant, but still get the error.

I have checked to see if the References are complete, but don't find any missing.

Any suggestions?

- g
 
Last edited:

jesusoneez

IT Dogsbody
Local time
Today, 13:41
Joined
Jan 22, 2001
Messages
109
Hi,

I've done a bit a googling and it seems a lot of people get this error after upfrading their versions of Access, whether they've upgraded the file type or not.

Also,

Code:
Forms!frmCaseList!frmsubProjCases.Form.RecordSourc e = strSQL

I'm assuming the "space" between "Recordsourc" and "e = strSQL" isn't in your actual code?

Other than that, hopefully the uber gurus can help as there seems to be a lot of people with this problem out there, and not a lot in the way of a solution...
 

gromit

Registered User.
Local time
Today, 05:41
Joined
Nov 17, 2005
Messages
260
Thanks, did your googling suggest that there were any work arounds? Is it worth upgrading the db file version?

Good catch on the extra space -- I was hopeful for a minute -- but the procedure itself does not have that space.

I'm really stumped. I've checked two other machines running Access 2003. No problems.

- g
 

KeithG

AWF VIP
Local time
Today, 05:41
Joined
Mar 23, 2006
Messages
2,592
If the problem is just on the one PC I would have access reinstalled. You might be missing a .dll or something and that could be causing the error. If the procedure works on other PC it got to have something to do with the Access Appliction on the PC. When you startup access does it say there is a missing reference?
 

gromit

Registered User.
Local time
Today, 05:41
Joined
Nov 17, 2005
Messages
260
There are no warnings about missing references and I've checked the list manually.

If it were a missing dll, I would imagine that we would see other errors - but this is just focused on the one procedure.

My own web searches have turned up a number of similar sounding incidents -- but no description of the root cause or solution.

- g
 

Users who are viewing this thread

Top Bottom