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.

get a value from as we loop through table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thelee - 22 Nov 2005 21:01 GMT
Hi! Please help me! i have a filed ADay on the table. when i loop through
rows using "aDate = rst![ADay]" everything goes fine until there is a null.
and when it has null my program stop. and when i use "aDate =
DLookup("[ADay]", "Table1")", it would work good even if i have null and it
would go through. but  when it is looping it would have the first value that
it get all the way. and it is not suppose to. the values on records changes.
but i don't get it why it is keeping the old value all the time. is there any
other function i should use it. help me please!

aDate = DLookup("[ADay]", "Table - List Empl and Contr")
        aDate = rst![ADay]
        MsgBox (aDate)
SusanV - 22 Nov 2005 21:31 GMT
You could either filter out nulls using SQL in your data source, or try the
Nz function.
Signature

hth,
SusanV

> Hi! Please help me! i have a filed ADay on the table. when i loop through
> rows using "aDate = rst![ADay]" everything goes fine until there is a
[quoted text clipped - 13 lines]
>         aDate = rst![ADay]
>         MsgBox (aDate)
Thelee - 22 Nov 2005 21:45 GMT
Thanks Susan, how do i use nz function nz((dlookup),0). would it bring the
values from the current row when i loop each time. because when i was using
it. it would have the first value always and i don't know why. help me with
that, too. thanks!

> You could either filter out nulls using SQL in your data source, or try the
> Nz function.
[quoted text clipped - 15 lines]
> >         aDate = rst![ADay]
> >         MsgBox (aDate)
 
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.