By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,762 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,762 IT Pros & Developers. It's quick & easy.

data from one form field to another

P: 1
I have a form in which the 1st field is the date of class. there might be 20 people in the class. they would have the same date. is there a way I can have the date of the first form duplicate automatically to the next form date of class?
Jun 7 '17 #1

✓ answered by jforbes

A simple way to accomplish this is to set the .DefaultValue property of the field you want the value to carry over on during it's AfterUpdate Event.

This is an example:
Expand|Select|Wrap|Line Numbers
  1. Private Sub TransDate_AfterUpdate()
  2.         TransDate.DefaultValue = "#" & Me.TransDate.Value & "#"
  3. End Sub

Share this Question
Share on Google+
2 Replies


jforbes
Expert 100+
P: 1,107
A simple way to accomplish this is to set the .DefaultValue property of the field you want the value to carry over on during it's AfterUpdate Event.

This is an example:
Expand|Select|Wrap|Line Numbers
  1. Private Sub TransDate_AfterUpdate()
  2.         TransDate.DefaultValue = "#" & Me.TransDate.Value & "#"
  3. End Sub
Jun 7 '17 #2

NeoPa
Expert Mod 15k+
P: 31,489
Not forgetting to format the date properly (Literal DateTimes and Their Delimiters (#)).
Jun 7 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.