Linked Field

P

Paul

I have a table with a list of service areas and the person responsible
for that area eg Audit = Joe Bloggs and Finance = Liz House.

This table is used for various forms. When I open a form I need to
input some info including service area and name. (I want to ensure the
correct info is used) therefore when I choose Audit in SA field I want
Joe Bloggs to show automatically in the Contact field.

I know I have already asked this but I got so lost and bogged down
with it I am trying again.

Thanks everyone
 
J

John W. Vinson

I have a table with a list of service areas and the person responsible
for that area eg Audit = Joe Bloggs and Finance = Liz House.

This table is used for various forms. When I open a form I need to
input some info including service area and name. (I want to ensure the
correct info is used) therefore when I choose Audit in SA field I want
Joe Bloggs to show automatically in the Contact field.

I know I have already asked this but I got so lost and bogged down
with it I am trying again.

Thanks everyone

Assuming that the responsibilities will shift over time, and that you want to
record the contact *as of the time that the form is used*, you can "push" the
name into the contact field.

Include the person's name in the combo's Row Source query, and be sure that
the combo's Column Count is big enough to include it. Then put code in the
combo's AfterUpdate event. Find the event on the combo's properties Events
tab, click the ... icon by it, and choose Code Builder. Access will give you
the sub and end sub lines:

Private Sub comboboxname_AfterUpdate()
Me![Contact] = Me!comboboxname.Column(n)
End Sub

where n is the *zero based* position of the contact name - i.e. 2 if that's
the third field in the query.
 
P

Paul

I have a table with a list of service areas and the person responsible
for that area eg Audit = Joe Bloggs and Finance = Liz House.
This table is used for various forms. When I open a form I need to
input some info including service area and name. (I want to ensure the
correct info is used) therefore when I choose Audit in SA field I want
Joe Bloggs to show automatically in the Contact field.
I know I have already asked this but I got so lost and bogged down
with it I am trying again.
Thanks everyone

Assuming that the responsibilities will shift over time, and that you want to
record the contact *as of the time that the form is used*, you can "push"the
name into the contact field.

Include the person's name in the combo's Row Source query, and be sure that
the combo's Column Count is big enough to include it. Then put code in the
combo's AfterUpdate event. Find the event on the combo's properties Events
tab, click the ... icon by it, and choose Code Builder. Access will give you
the sub and end sub lines:

Private Sub comboboxname_AfterUpdate()
Me![Contact] = Me!comboboxname.Column(n)
End Sub

where n is the *zero based* position of the contact name - i.e. 2 if that's
the third field in the query.

Thank you Sir. I now have it working. Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top