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 / May 2008

Tip: Looking for answers? Try searching our database.

Update Subform with Data from Main Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mp80237 - 28 May 2008 18:13 GMT
Hello, I have a database that is connected to SQL via ODBC (view Only).  I
created a form that is pulling that data from the SQL so the group can see
the records.  I have a subform that my group is to use to update.  Most of
the time they are to grab a date [StartDate] from the form and put it in the
subform.  Sometimes not, they put in a different [StartDate].  Because the
date field is in mm/dd/yyyy hh:mm:ss format (exp.  1/2/2008 2:34:25 PM) I
would like to create a button that when clicked the date gets populated in
field StartTime.  Ideas?
John W. Vinson - 29 May 2008 05:49 GMT
>Hello, I have a database that is connected to SQL via ODBC (view Only).  I
>created a form that is pulling that data from the SQL so the group can see
[quoted text clipped - 4 lines]
>would like to create a button that when clicked the date gets populated in
>field StartTime.  Ideas?

The format is irrelevant - a date/time value is stored as a number.

The button code would be something like

Private Sub cmdFillDate_Click()
Me![controlname] = Parent![StartDate]
End Sub

This will copy whatever value is in the parent form's StartDate control into
the control named controlname on the subform.
Signature


            John W. Vinson [MVP]

 
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.