would like to store recordID from subform into form table (1 Viewer)

lightray

Registered User.
Local time
Tomorrow, 00:09
Joined
Sep 18, 2006
Messages
270
This is either a no brainer or falls into the calculated field syndrome.

My HR database stores Employee job history records. I display the current job (condition Null EndDate) in a subform. I would like to store the Division ID of this Job in the Employees Record, to make it easier to create Divisional reports. I am able to display the value by setting the Data Source to the subform field name value, but it won't write the value to the table. I have to manually type it in. There's definately some learnin' here!

Thanks for listenin':)
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 13:09
Joined
Jul 9, 2003
Messages
16,282
.
Assuming the main form is linked to the table storing "Employees Record" and the subform is linked to the table storing "Employee job history records" and in that table there is a field "Division ID " then really you already have the information you require. All you need to do is create a query and base your report on that.
 

lightray

Registered User.
Local time
Tomorrow, 00:09
Joined
Sep 18, 2006
Messages
270
Thanks for your response Uncle Gizmo,
That is the idea I had when I set it up. However I'm missing the point where the Division ID in the Division winds up in the Division ID in the Employee Table. When I create a Job record I open the Data Entry form for Job History and link via the Employee ID and select the Division from a combo box. I then return from this proceedure by closing the form (manually) and refresh the Main form to display the contents of the subform.
It is at this point that the DivisionID has likely changed (new job in new division) so need to input (if new Emp.) or change existing.
Is it perhaps in my relationships that I need to look? I have an, only include rows where the join fields in both tables are equal, type join
 

lightray

Registered User.
Local time
Tomorrow, 00:09
Joined
Sep 18, 2006
Messages
270
Bing! I think a light bulb just went on, amazing what 6 hours sleep will do for you. Your idea is to insert the Division at 'create Employee record time' "ok! must have lost focus on that". That will get thee initial valve in. :)
However, it would be good if a new job was entered and the Division changed that it was automatically updated. perhaps a lookup?
 

lightray

Registered User.
Local time
Tomorrow, 00:09
Joined
Sep 18, 2006
Messages
270
Still wondering if there is a way to populate the field and update automatically?

anyone??? ..actually I got the populate bit down, it just won't update.:(
 

Users who are viewing this thread

Top Bottom