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 / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Access 2007: Data type error using Val(string) expression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Justin - 13 Jul 2006 15:48 GMT
Hello,

I am building a criteria expression and I'm using a Val(string) expression.  
When I click Run, I am getting a data type in expression error. I have
confirmed that the field is of type 'text' and in fact all entries are
numbers coded as strings (not that it would matter if there was text).

Can someone please help?
Jerry Whittle - 13 Jul 2006 16:39 GMT
I haven't played with 2007 but it looks like a references problems.  What
happens if you go to the Immediate window and type in the following and hit
enter?

Debug.Print Val("123ABC")

If you get the same error, it's either a references problem or a bug in A07.
If you don't get an error, you need to look at your code a little closer.

Oh! Val chokes on null values so make sure there aren't any of them.
Signature

Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Hello,
>
[quoted text clipped - 4 lines]
>
> Can someone please help?
Justin - 13 Jul 2006 18:28 GMT
It was the null / blank / zero length string problem.  I fixed it by doing a
find / replace but I had some difficulty with that too; it worked eventually
...  The problem was that when I do a Find/Replace for "", the first click to
the Find says none found, the second click however works! Ughhh. I have no
idea what made me try the second click - frustration?

Well, the important thing is that your advice in pointing  me to the Null
worked. thanks!

> I haven't played with 2007 but it looks like a references problems.  What
> happens if you go to the Immediate window and type in the following and hit
[quoted text clipped - 15 lines]
> >
> > Can someone please help?
 
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.