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 / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

"No value" errror

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrated - 02 Feb 2006 17:20 GMT
How does one test for 'no value', as in runtime error 2427 "You entered an
expression that has no value"?

Tried IsNull, IsMissing and IsEmpty, but processing just skips right by.

I am giving people the ability to move an entry from a subform list, but
occasionally the subform list is already empty.  I want to control what
happens if some bozo clicks the 'move' button on an empty list, but all
attempts to test if the subform control has no value, as in the following code

If IsMissing(Me.SubAreaList!SubareaID) Then
  msgbox "There is no selected subarea to move"
  GoTo Exit_cmdMoveSubarea_Click
End If

As I mentioned above, ismissing, isnull and isempty all fail to detect the
'no value' problem in this example.

Any ideas how to detect the empty list, short of querying the database with
the list conditions to see if anything is on the list?

Thanks in advance to anyone that has an idea how to trst for this condition.

Fred
Marshall Barton - 02 Feb 2006 18:32 GMT
>How does one test for 'no value', as in runtime error 2427 "You entered an
>expression that has no value"?
[quoted text clipped - 16 lines]
>Any ideas how to detect the empty list, short of querying the database with
>the list conditions to see if anything is on the list?

You need to test for the no record situation instead of
testing for the non-existent value:

If Me.SubAreaList.RecordsetClone.RecordCount = 0 Then

Signature

Marsh
MVP [MS Access]

 
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.