Loading data in a table from a dropdown list

G

George

Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT [], [],
[]..... but I don't know how it works.
Thank you in advance for any clue :)
 
C

Cheryl Fischer

Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of columns 2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,
 
G

Guest

:D
YOU ARE THE BOMB!!!
You DID IT!!!

Thank you so much. It works perfect. Now I have to play a
little bit around to let the fields autoexpand on the
list, so I don't have the horizontal scroll bar to see
FirstName, LastName and ComapnyName, but the DB is
logically working.
I will also try to concatenate data from FirstName,
LastName and ComapnyName to be displayed under Lawyer's
Name once one is selected, because right now it's only
displaying FirstName.

But those are format thing that I believe I can deal with.
Thank you so much for your help!! I was really STUCK!!!

THANKS!! :D
George
-----Original Message-----
Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of columns 2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT [], [],
[]..... but I don't know how it works.
Thank you in advance for any clue :)


.
 
C

Cheryl Fischer

I just love it when a plan comes together! Thank you for letting me know.

Just a note: If you do experiment with concatenating to reduce the number
of columns, do not forget to change the ColumnCount property.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

:D
YOU ARE THE BOMB!!!
You DID IT!!!

Thank you so much. It works perfect. Now I have to play a
little bit around to let the fields autoexpand on the
list, so I don't have the horizontal scroll bar to see
FirstName, LastName and ComapnyName, but the DB is
logically working.
I will also try to concatenate data from FirstName,
LastName and ComapnyName to be displayed under Lawyer's
Name once one is selected, because right now it's only
displaying FirstName.

But those are format thing that I believe I can deal with.
Thank you so much for your help!! I was really STUCK!!!

THANKS!! :D
George
-----Original Message-----
Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of columns 2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT [], [],
[]..... but I don't know how it works.
Thank you in advance for any clue :)


.
 
G

George

:D

THANK YOU SO MUCH !!! You're the bomb!! It worked
perfect!!

Now I'm dealing with some formating issues, but the
database is "logically" working.
I want to remove the horizontal scroll bar widening the
dropdown list, and then concatenate the information from
the 3 fields in one, so I it displays Firstname, Lastname
and Company, even after selected (right now it's
displaying only first name after selected).

But nothing that I can't deal with reading some webs and
the help (I hope so, ha, ha..)

THANK YOU SO MUCH FOR YOUR HELP. I WAS REALLY STUCK WITH
THAT PROBLEM FOR 2 DAYS!!!

Best regards,

Jorge
-----Original Message-----
Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of columns 2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT [], [],
[]..... but I don't know how it works.
Thank you in advance for any clue :)


.
 
C

Cheryl Fischer

Just start a new thread if you need more help on your combo boxes. We are
here to help.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
:D

THANK YOU SO MUCH !!! You're the bomb!! It worked
perfect!!

Now I'm dealing with some formating issues, but the
database is "logically" working.
I want to remove the horizontal scroll bar widening the
dropdown list, and then concatenate the information from
the 3 fields in one, so I it displays Firstname, Lastname
and Company, even after selected (right now it's
displaying only first name after selected).

But nothing that I can't deal with reading some webs and
the help (I hope so, ha, ha..)

THANK YOU SO MUCH FOR YOUR HELP. I WAS REALLY STUCK WITH
THAT PROBLEM FOR 2 DAYS!!!

Best regards,

Jorge
-----Original Message-----
Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of columns 2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT [], [],
[]..... but I don't know how it works.
Thank you in advance for any clue :)


.
 
G

George

THANK YOU!!!

I'll read more and once I feel really stuck I'll start a
new one.
I don't want to waste others' time without puting some
effort from my side first, but be sure I'll start a new
one if I get stuck again :)

Thank you so much for your support!!
Regards,

jorge

-----Original Message-----
Just start a new thread if you need more help on your combo boxes. We are
here to help.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George said:
:D

THANK YOU SO MUCH !!! You're the bomb!! It worked
perfect!!

Now I'm dealing with some formating issues, but the
database is "logically" working.
I want to remove the horizontal scroll bar widening the
dropdown list, and then concatenate the information from
the 3 fields in one, so I it displays Firstname, Lastname
and Company, even after selected (right now it's
displaying only first name after selected).

But nothing that I can't deal with reading some webs and
the help (I hope so, ha, ha..)

THANK YOU SO MUCH FOR YOUR HELP. I WAS REALLY STUCK WITH
THAT PROBLEM FOR 2 DAYS!!!

Best regards,

Jorge
-----Original Message-----
Try this, George,

In the Properties sheet for your ComboBox, make the following changes:

RowSource: Select LawyerID, FirstName, LastName, CompanyName from LAWYERS
Order by LastName, FirstName;
BoundColumn: 1
ColumnCount: 4
ColumnWidths: 0;1;1;1.5 (change the widths of
columns
2,3, and 4 as you
wish, leaving column 1 at 0)
ControlSource: LawyerID

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Hello,
I have a Table, LAWYERS, which has the following fields:
LawyerID, FirstName, LastName and CompanyName among
others.
I have a JointTable with the following fields: CaseID,
LawyerID and WorfFor.

What I want to do is to load the LawyerID in the
JointTable but scrolling down a list that contains
FirstName, LastName and CompanyName fields from LAWYERS
Table. Just display those values in the list and then
return the LawyerID associated with those fields to be
stored in the JointTable.
I saw the same example in Northwind, when they display
products descriptions but they store productID.
How do I do this?
I've been trying many SQL queries in the Row Source, and
then changing Control Source but nothing seems to work.
Am I just doing something wrong? or I can't do what I
want to do with this structure of tables?
Thank you,

George

PS: the last Row Source SQL query I used is
SELECT Lawyers.LastName, Lawyers.FirstName,
Lawyers.CompanyName FROM Lawyers;
I saw in Northwind that they used SELECT DISTINCT
[],
[],
[]..... but I don't know how it works.
Thank you in advance for any clue :)


.


.
 

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