Feild Links

S

SAA19

I need to link two fields so that when I enter the name in the name field the
next field automatically enters his title SVP. I have already created the
additional table with the names of the group and their title and I can
access all the names from a drop down box but how do I get the next field to
automatically add the title information in the next field?
 
S

Scott McDaniel

You can use a DLookup in your combos AfterUpdate event:

Me.YourTitleTextBox = DLookup("strTitle", "tblTitles", "SomeField='" &
Me.YourCombo.Column(1) & "'"

Of course you'll have to change the table/field/control names to match your
own ... this assumes that you're looking up a Text field, hence the single
quote surrounding your Combo value ... if you need to lookup a Numeric
value, do away with the single quotes. Note also that columns in a combo are
zero based, therefore .Column(0) is the first column, .Column(1) is second,
etc etc
 

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