> 1) I have a lookup table for the contactID which looks up the contact's
name[color=blue]
> in the contact table so that "firstname, middlename, lastname" appears in
> the dropdown insead of just the contactID number. Unfortunately 2 things
> occur: (a) I see the firstname, middlename, lastname fields but I want[/color]
them[color=blue]
> sorted by the lastname field -- it sorts by firstname; (b) when I finish
> using the dropdown, all I see is the firstname field and the other two
> disappear. I'd like to have all 3 fields appear.[/color]
Since the combo box is based on a query, then simply bring up the combo box,
click on the sql data source, and set the sort for last name to be
descending. You should probably thus make the combo box have CntactId,
LastName, middle, First. (Make whatever field you want to search by the 2nd
field to the contact id). Once the user selects the name, then contactId is
set. You can either display Middle, first etc by placing additional text
boxes on the screen, and using dlookup's as the source for each text box.
However, that is a bit messy, so you can consider basing the form on a sql
that joins in those additonal fields. Even more cool is to consider using a
sub-form. I explain how to do this at:
http://www.attcanada.net/%7ekallal.m...000000005.html
[color=blue]
> 2) I'd like to have a field which merely displays the companyname field[/color]
from[color=blue]
> the company table on this form. Since I have selected a contactID, I have[/color]
a[color=blue]
> companyID lookup in the contact table. I'm not sure how to set up this[/color]
query[color=blue]
> and a field that shows the results of the query in the form.[/color]
Yes, this would be double lookup. So, yea, I would use my sub-form idea, and
build a query that displays the contactId, Contact Name, and Contact
Company. You then base the sub-form on this query and you thus get to
display all the contact info, and you ONLY need to supply the contactId in
you main form to display all of this stuff! (use the link master/child in
the sub-form based on contactId).
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
NoooSPAmkallal@msn.com http://www.attcanada.net/~kallal.msn