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.

Keeping data in column for new record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sunnie - 11 Aug 2005 21:57 GMT
How do I enter a record and have some of the information in the form show up
on the next record until I change it.
Graham Mandeno - 12 Aug 2005 00:16 GMT
Hi Sunnie

Use the DefaultValue property of the control that you want to preset.  You
can set the DefaultValue easily in your form's VBA code.  The place to do it
depends on your needs.

Generally, the control's AfterUpdate property is the best place, so whenever
the user enters a new value, that value becomes the default value for the
next record.  If you have a lot of controls, you could have a
general-purpose function for the job:

Public Function UpdateDefaultValue()
With Screen.ActiveControl
   .DefaultValue = """" & .Value & """"
End With
End Function

Then, just set the AfterUpdate property for the required controls to:
   =UpdateDefaultValue()

Note that DefaultValue is a string, and so should be enclosed in quotes.
Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

> How do I enter a record and have some of the information in the form show
> up
> on the next record until I change it.
 
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.