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 / August 2005

Tip: Looking for answers? Try searching our database.

Form not updating automatically using dcount

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LU - 03 Aug 2005 19:54 GMT
I'm using the following in control source of a textbox
=DCount("InitialAssesment","Wounds","InitialAssesment=YES AND
WoundDate=date()")

When I move forward to a NEW record the count is updated correctly.
When I move back 1 record the count is wrong (current count -1)
If I open and close the database the count corrects itself.
If I move forward and back through more records the counts SOMETIMES
corrects itself.

Any ideas?
Klatuu - 03 Aug 2005 20:58 GMT
Move your code to the Current event of the form:
Me.txtWoundCount = DCount("InitialAssesment","Wounds","InitialAssesment=YES
AND
WoundDate=date()")

I am assuming this is an unbound text box.

> I'm using the following in control source of a textbox
> =DCount("InitialAssesment","Wounds","InitialAssesment=YES AND
[quoted text clipped - 7 lines]
>
> Any ideas?
LU - 03 Aug 2005 21:21 GMT
Where is the Current event of the form?
Is that in the coding area?
Thank you,

> Move your code to the Current event of the form:
> Me.txtWoundCount = DCount("InitialAssesment","Wounds","InitialAssesment=YES
[quoted text clipped - 14 lines]
> >
> > Any ideas?
LU - 03 Aug 2005 21:28 GMT
I dont see On current in the properties of this unbound textbox.

> Where is the Current event of the form?
> Is that in the coding area?
[quoted text clipped - 18 lines]
> > >
> > > Any ideas?
Klatuu - 03 Aug 2005 21:30 GMT
In design mode, open the properties dialog for the form, click on the Events
tab, then look for On Current.  Select the Code Builder option, and put the
code in there.

> Where is the Current event of the form?
> Is that in the coding area?
[quoted text clipped - 18 lines]
> > >
> > > Any ideas?
 
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.