Copy field to a subform field and populate. (1 Viewer)

Rushman21

Registered User.
Local time
Yesterday, 16:10
Joined
Nov 2, 2011
Messages
23
Hard to search on something I can't even explain. Attached is the database I'm working on. I want have the Employee_Name to be in the Full_Name in the subfolder. Which the only way I could think of is to have the Full_Name control Source =[Forms]![WorkOrder_Main]![Employee name]. I want to be able to automatically add the Hourly_Rate and OT_Rate for that specific user in the Full_Name. The reason why I'm building the DB this way is that some of the Project_Numbers have different Employee_Name wages. I need to have the Rates auto fill by the user name in the Full_Name field when selecting the Employee_name in the main form. See attached DB. View attachment Capital Projects.accdb
Please reply back if you need me to explain more.
Thank you very much for your time.
 

Rushman21

Registered User.
Local time
Yesterday, 16:10
Joined
Nov 2, 2011
Messages
23
Thank you for the reply. The problem that I'm having is when I use the Me.TextboxName = Me.ComboName.Column(2) code, it fills in all of my Full_Names in the subform to the last person I added to the main form. So, all of my other records in the subforms now have the last person's name filled in when It is supposed to be just whoever is listed in the main form. Does that make sense?

Thank you!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:10
Joined
Aug 30, 2003
Messages
36,124
Since the full name field in the subform is not bound, it will show the same value for every record. It should be bound to the field in the table (and normally that would be the ID field from tblEmployees, not the name).
 

Rushman21

Registered User.
Local time
Yesterday, 16:10
Joined
Nov 2, 2011
Messages
23
Great! That worked. One more issue. It fills the name only in the highlighted row in the subform. If I add another Project_Number (another row in the subform), it doesn fill unless I go back to the main form and re-select the name.

Thank you so much! You are helping a lot.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:10
Joined
Aug 30, 2003
Messages
36,124
I would use the after update event of the project combo, which will occur for every record. Or maybe the insert event of the subform.
 

Rushman21

Registered User.
Local time
Yesterday, 16:10
Joined
Nov 2, 2011
Messages
23
This is where I get stuck. If I try the update event in the project combo, I type in me.full_name = me.. How do i select the Employee_name in the main work order. I tried me.fullname = me.workorder_main!employee_name but that didn't work.
 

Rushman21

Registered User.
Local time
Yesterday, 16:10
Joined
Nov 2, 2011
Messages
23
Ding, ding ding... Winner. Parent was what I needed. Thank you so much for your information and time. I spent days trying to figure this out. You are awesome!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:10
Joined
Aug 30, 2003
Messages
36,124
Happy to help!
 

Users who are viewing this thread

Top Bottom