Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Invalid use of Null

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alain - 24 Nov 2005 20:41 GMT
Hi,
I am getting this error 94 in my Dmax but cannot understand why, If I remove
the criteria, everything is working well. The strPa value changes on regular
basis but for my testing I assign it a perm value and stil lget the same
error

strPa = "BE"

'recherche du > num
num = DMax("Right([ReferenceNo],3)", "tblProperty", "Mid([ReferenceNo],2,2)=
'& strPa &'")

Can anyone explain me why I get the error 94

Thanks
Alain - 24 Nov 2005 21:06 GMT
Sorry found the solution which I do not understand because I use that
solotion to begin with !!!!

num = DMax("Right([ReferenceNo],3)", "tblProperty", "Mid([ReferenceNo],2,2)
= '"& strPa &"'")

> Hi,
> I am getting this error 94 in my Dmax but cannot understand why, If I
[quoted text clipped - 11 lines]
>
> Thanks
Graham Mandeno - 24 Nov 2005 21:19 GMT
Hi Alain

Your code is not substituting the value of strPa into the criteria string.
Instead, it is looking for records where the second and third characters
of [ReferenceNo] are /& strPa &/.
This can't return any records because a two-character string can't equal
a nine-character string!

You need to terminate the string after the opening single-quote and start it
again before the closing single-quote:

"Mid([ReferenceNo],2,2)='" & strPa & "'"
Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

> Hi,
> I am getting this error 94 in my Dmax but cannot understand why, If I
[quoted text clipped - 11 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.