Hello Jim,
I did what you said but still not able to see the first
and last names on my form.
My query for the field emp # combo box (in the Row Source)
is SELECT [EMPLOYEE].[PRI_SN], [EMPLOYEE].[Surname],
[EMPLOYEE].[Given_Name] FROM EMPLOYEE;
In the Column Count (of the emp # field) I added 3 to the
Format tab. Then entered the Column
Widths property of 1";0";0".
Then I added two text fields to my form and in the Control
Source of one I added =[cboMyCombo].[Column](1)and to the
other one I added =[cboMyCombo].[Column](2).
On my form I am able to select the emp # but in the other
two text boxes all I see is #Name? and nothing is being
entered after I select the emp #.
Any ideas why?
-----Original Message-----
Everything would propagate from the data in the combo box.
Assuming that the combo with the emp# has a Row Source Type of Query;
add the names to the query (Row Source) - select the Row Source in the
properties of the combo box and click the elipsis button [...] to the
right to modify the query.
Modify the query so that the names follow the emp#. After that select
the Column Count on the Format tab and enter 3. Then select the Column
Widths property and enter 1";0";0".
Then just add the Control Sources to the textboxes where you want the
names to appear - as I mentioned previously.
- Jim
so do I have two add the First_Name and Last_Name fields
to my form and modify their properties or do I have to add
new text boxes or do I do everything from my employee
field properties?
could you be a little more detailed, if possible. Sorry
I'm very new at this and need a little more explanation..
Thanks.
-----Original Message-----
On Thu, 20 Nov 2003 11:32:44 -0800, "Karen"
Hello,
I am creating a form and was wondering if there was any
way to automatically fill in fields with data from one
of
my tables.
I have an emp #: field on my form, what I would like to
have done is when a user populates the field from a
combo
box value list of emp #'s I would like that person's
first
and last name (which are seperate fields in my employee
table) to appear on the form in another field so that
the
user is re-assured that they chose the right employee.
Is this possible??
Sure.
Add the employee names to the Row Source of the combo
box.
Change the column count to include those. (That would be
3 columns.)
Set the Column widths for those to 0. For example:
1";0";0"
Set the Control Source for the text boxes to the hidden
columns of the
combo box.
Like: =[cboMyCombo].[Column](1) for the first name and
=[cboMyCombo].[Column](2) for the last name - assuming
you have them
in that order in the row source.
Note that columns are zero base so 1 is the second column.
That should do it.
- Jim
.
.