A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form Auto Populate



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2010, 06:36 PM posted to microsoft.public.access.forms
pleasehelpme
external usenet poster
 
Posts: 4
Default 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  
Old May 14th, 2010, 02:46 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.