form combo box question

S

susancca

In a Combo Box on my form I have a list of Dr A, Dr B, and Dr C. Each of
these Dr's have a Dr Number associated with them, so Dr A is 001, Dr B is 002
and Dr C is 003. I want to select Dr A from my combo box and automatically
feed 001 into the next field box of 'Dr Number'. How do I link the boxes
together to do this? I'm sure this is covered in a help topic but unsure how
it would be worded to search. If anyone can help I would appreciate it!
thanks!
 
K

KARL DEWEY

I suggest to not use two boxes but one.
Use something like this for the Row Source --
SELECT [DRNum], [DRNum] & " - " & [DRName] FROM [YourTable] ORDER BY
[DRName];

This way both the number and name will show in the combo.
 
S

susancca

When I type in a new patient into the form and choose Dr A as their dr, it
populates into a spreadsheet that tracks all the patients and there is a
separate column for Dr name and their number. Will this populate both columns
then in the spreadsheet? that was why I figured I would need 2 boxes.

KARL DEWEY said:
I suggest to not use two boxes but one.
Use something like this for the Row Source --
SELECT [DRNum], [DRNum] & " - " & [DRName] FROM [YourTable] ORDER BY
[DRName];

This way both the number and name will show in the combo.

susancca said:
In a Combo Box on my form I have a list of Dr A, Dr B, and Dr C. Each of
these Dr's have a Dr Number associated with them, so Dr A is 001, Dr B is 002
and Dr C is 003. I want to select Dr A from my combo box and automatically
feed 001 into the next field box of 'Dr Number'. How do I link the boxes
together to do this? I'm sure this is covered in a help topic but unsure how
it would be worded to search. If anyone can help I would appreciate it!
thanks!
 
K

KARL DEWEY

it populates into a spreadsheet
What do you mean by the term 'spreadsheet'?
How does the data get from form to your spreadsheet?

susancca said:
When I type in a new patient into the form and choose Dr A as their dr, it
populates into a spreadsheet that tracks all the patients and there is a
separate column for Dr name and their number. Will this populate both columns
then in the spreadsheet? that was why I figured I would need 2 boxes.

KARL DEWEY said:
I suggest to not use two boxes but one.
Use something like this for the Row Source --
SELECT [DRNum], [DRNum] & " - " & [DRName] FROM [YourTable] ORDER BY
[DRName];

This way both the number and name will show in the combo.

susancca said:
In a Combo Box on my form I have a list of Dr A, Dr B, and Dr C. Each of
these Dr's have a Dr Number associated with them, so Dr A is 001, Dr B is 002
and Dr C is 003. I want to select Dr A from my combo box and automatically
feed 001 into the next field box of 'Dr Number'. How do I link the boxes
together to do this? I'm sure this is covered in a help topic but unsure how
it would be worded to search. If anyone can help I would appreciate it!
thanks!
 
S

susancca

I meant to write Table (I'm used to working with excel and keep calling it a
spreadsheet).

KARL DEWEY said:
What do you mean by the term 'spreadsheet'?
How does the data get from form to your spreadsheet?

susancca said:
When I type in a new patient into the form and choose Dr A as their dr, it
populates into a spreadsheet that tracks all the patients and there is a
separate column for Dr name and their number. Will this populate both columns
then in the spreadsheet? that was why I figured I would need 2 boxes.

KARL DEWEY said:
I suggest to not use two boxes but one.
Use something like this for the Row Source --
SELECT [DRNum], [DRNum] & " - " & [DRName] FROM [YourTable] ORDER BY
[DRName];

This way both the number and name will show in the combo.

:

In a Combo Box on my form I have a list of Dr A, Dr B, and Dr C. Each of
these Dr's have a Dr Number associated with them, so Dr A is 001, Dr B is 002
and Dr C is 003. I want to select Dr A from my combo box and automatically
feed 001 into the next field box of 'Dr Number'. How do I link the boxes
together to do this? I'm sure this is covered in a help topic but unsure how
it would be worded to search. If anyone can help I would appreciate it!
thanks!
 

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