If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Form Auto Populate
I hope this makes sense...
My frmEmployeeMain contains one subform, frmProbation. Within frmProbation, there are three subforms, frmProb1, frmProb2, frmProb3. Each of these three subforms has a CompletionDate field. These three subforms were created by three queries from ONE table, tblProbation. The frmEmployeeMain was created from tblEmployeeInfo. In tblEmployeeInfo and frmEmployeeMain, there is a LastReportReceived field. The EmployeeID is the related record in all these forms and tables. Is it possible to automatically populate the LastReportReceived field with the most current date entered in any of the three Prob subforms, and also allow the LastReportReceived field to be edited? |
#2
|
|||
|
|||
Form Auto Populate
You can use the after update event of each subform to set the date on the
main form. Code the after update event of each subform would be something like this, Me.Parent.DateControlName = Me.DateControlName To make sure you get the most recent date, something like this: If Not IsNull(Me.Parent.DateControlName) Then If Me.DateControlName Me.Parent.DateControlName Then Me.Parent.DateControlName = Me.DateControlName End If Else Me.Parent.DateControlName = Me.DateControlName End If Note: replace my object names with your own names. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "PleaseHelpMe" wrote in message news I hope this makes sense... My frmEmployeeMain contains one subform, frmProbation. Within frmProbation, there are three subforms, frmProb1, frmProb2, frmProb3. Each of these three subforms has a CompletionDate field. These three subforms were created by three queries from ONE table, tblProbation. The frmEmployeeMain was created from tblEmployeeInfo. In tblEmployeeInfo and frmEmployeeMain, there is a LastReportReceived field. The EmployeeID is the related record in all these forms and tables. Is it possible to automatically populate the LastReportReceived field with the most current date entered in any of the three Prob subforms, and also allow the LastReportReceived field to be edited? |
Thread Tools | |
Display Modes | |
|
|