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

Passing values from a subform to a form

P: 27
Hello anybody who can help me how to pass a value from subform named: Position Filled to a form named Register new employee,

Values from Sub form are: Name, Last Name, Supervisor, start date, replacing

Before I was passing the values to a table but now I need to pass the values that I have in the subform to a Form.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Position_Status_AfterUpdate()
  2.       If Me.Position_Status = "Closed" Then
  3.  
  4.           DoCmd.OpenForm "frm_Register_New_Employee", acNormal
  5.  
  6.           'Forms![frm_Register_New_Employee]![subfrm_GCDS_Operations_Positions_Fills_New.NAME].Form![txtFirstName.value]
GOT IT NOW:
Expand|Select|Wrap|Line Numbers
  1.           Forms![frm_Register_New_Employee].Form!txtFirstName = Me![Name]
  2. End Sub
Nov 22 '17 #1

✓ answered by NeoPa

You have an unmatched If in your code in case that's important to you.

Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,418
You have an unmatched If in your code in case that's important to you.
Nov 27 '17 #2

Post your reply

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