Form help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help in having one text box once I fill it in I would like it to
automatic fill in 2 other text boxes. For example: One text would be the ID #
and the other 2 are last name and first name.
 
I need help in having one text box once I fill it in I would like it to
automatic fill in 2 other text boxes. For example: One text would be the ID #
and the other 2 are last name and first name.

What's the RecordSource for this form? You're not trying to copy the
name fields from a Names table to store them redundantly in another
table, I hope?

I'd suggest using a Combo Box to select the name, and not expose the
ID number to the user at all. You can base a combo on a query like

SELECT [ID], [LastName] & ", " & [FirstName]
FROM namestable
ORDER BY [LastName], [FirstName];

Set the Bound Column property to 1, and the ColumnWidths property to

0;1.25

and you'll see "Vinson, John" but the computer will store the numeric
ID.

John W. Vinson[MVP]
 
I have 2 seperate tables...there is a table with the ID, Last Name and First
name..all I want it to do is fill in automatic when I enter the ID of the
person who it belongs to.

Thanks

John Vinson said:
I need help in having one text box once I fill it in I would like it to
automatic fill in 2 other text boxes. For example: One text would be the ID #
and the other 2 are last name and first name.

What's the RecordSource for this form? You're not trying to copy the
name fields from a Names table to store them redundantly in another
table, I hope?

I'd suggest using a Combo Box to select the name, and not expose the
ID number to the user at all. You can base a combo on a query like

SELECT [ID], [LastName] & ", " & [FirstName]
FROM namestable
ORDER BY [LastName], [FirstName];

Set the Bound Column property to 1, and the ColumnWidths property to

0;1.25

and you'll see "Vinson, John" but the computer will store the numeric
ID.

John W. Vinson[MVP]
 
Hello...I am receiving an error telling me to Check the subquery's syntax and
enclose the subquery in parentheses...I have it the way you said...do you
know what else I do....thanks.

John Vinson said:
I need help in having one text box once I fill it in I would like it to
automatic fill in 2 other text boxes. For example: One text would be the ID #
and the other 2 are last name and first name.

What's the RecordSource for this form? You're not trying to copy the
name fields from a Names table to store them redundantly in another
table, I hope?

I'd suggest using a Combo Box to select the name, and not expose the
ID number to the user at all. You can base a combo on a query like

SELECT [ID], [LastName] & ", " & [FirstName]
FROM namestable
ORDER BY [LastName], [FirstName];

Set the Bound Column property to 1, and the ColumnWidths property to

0;1.25

and you'll see "Vinson, John" but the computer will store the numeric
ID.

John W. Vinson[MVP]
 
Hello...I am receiving an error telling me to Check the subquery's syntax and
enclose the subquery in parentheses...I have it the way you said...do you
know what else I do....thanks.

No, you did not do what I said, because what I suggested does not
include a subquery.

Please open your query in SQL view (View... SQL on the menu), and copy
and paste the SQL string to a message here.

John W. Vinson[MVP]
 
Back
Top