Subform populates Main (1 Viewer)

Torg42

New member
Local time
Today, 08:33
Joined
Aug 12, 2009
Messages
2
Hello,

I am building a Construction Dispatch Program. In it I have a Main Form, that has 2 drop down combo boxes to pick Customer and Job. It also has a drop down box for drivers. When I pick one of each and hit add, it adds the Customer and Job to a sub form, and shows the driver under that project. Now I can also add additional truck drivers to that job, as long as I have the Customer and Job entered in the main form. Works grate.

I have the Subform running continuously and can have a ton of different jobs running in the sub form.

My problem is this: I want to add a driver to say the fifth job in the list. But I have to have the Customer and Job number in the main form, but it is set to my last driver addition, which could now be the 20 job I have entered. So if I could say highlight the fifth job, and have it populate the main forms Job and Customer info, I could then add a driver to that Job without having to pick the info again from the drop downs.

I hope that makes sense. I have tried to tackle this for hours.

Thanks a ton,

Troy
 

Torg42

New member
Local time
Today, 08:33
Joined
Aug 12, 2009
Messages
2
Hello,

I and a buddy were able to use this sub on a click event:

Private Sub Form_Click()
Forms!Dispatch!Contractor.Value = Me.CustName.Value
Forms!Dispatch!Jobs.Value = Me.Job_.Value
End Sub

And this allowed the sub form to populate the main forms 2 fields when you click on the sub forms record. The Job_ was used instead of the actual Job#, I guess access doesn't like pound signs.

Thanks,

Troy
 

HAMMAMABUARQOUB

Registered User.
Local time
Today, 18:33
Joined
Jul 29, 2009
Messages
75
these ideas can possibly give you a hint on how to populate the main form from the sub, and the sub from the man,,,
in this example, as you clik on a record or any field in the subform, the current data from the correspondant fields appear in the main,,
also, if you move in the record in the main. the sub will point to them,, you can add, delete, change and save changes to the data between forms
 

Attachments

  • ChngSubForm.zip
    16.4 KB · Views: 114

Users who are viewing this thread

Top Bottom