combo box (didn't post first time?)

  • Thread starter Thread starter Josh Sharpe
  • Start date Start date
J

Josh Sharpe

I have an Address look-up combo box on a form. When it drops down it
displays all of the fields Street/City etc and when it is selected it stores
the primary key in the field. That's all fine and dandy but is there a way
to make it display the Street/City info but still store the data the same
way???

It'd be easier for a data-entry to see the data they just entered than a
little ol' number.

Thanx
-Josh
 
Josh,

In the column widths property of the combobox, set the first column width to
zero. It will still be the first column, and it will still save the ID in
the field, but it will not display that column to the user. You'll find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that order. Set
the bound column property to 1, and the column widths property to 0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo box.

HTH,
Josh
 
The fields in the Address table are: Street City State Zip HomePhone
All of those fields show up when I drop down but only the Street is in there
when it's not. Is it possible to make it all visible there? If not I could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I learn Access at
the same time thanx to your help.

-Josh
 
Josh,

In the query that's in the recordsource property of the combo, you can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State] & " " & [Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at. If you have
trouble with this SQL syntax, try making a query based on the Address table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & " " & [Zip] & "
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh
 
ignore that last post

Josh Sharpe said:
I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Joshua A. Booker said:
Josh,

In the query that's in the recordsource property of the combo, you can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State] & " " & [Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at. If you have
trouble with this SQL syntax, try making a query based on the Address table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & " " & [Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


Josh Sharpe said:
The fields in the Address table are: Street City State Zip HomePhone
All of those fields show up when I drop down but only the Street is in there
when it's not. Is it possible to make it all visible there? If not I could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I learn
Access
at
the same time thanx to your help.

-Josh

Josh,

In the column widths property of the combobox, set the first column width
to
zero. It will still be the first column, and it will still save the
ID
in
the field, but it will not display that column to the user. You'll find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that order. Set
the bound column property to 1, and the column widths property to 0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo box.

HTH,
Josh

I have an Address look-up combo box on a form. When it drops down it
displays all of the fields Street/City etc and when it is selected it
stores
the primary key in the field. That's all fine and dandy but is
there
a
way
to make it display the Street/City info but still store the data the
same
way???

It'd be easier for a data-entry to see the data they just entered
than
a
little ol' number.

Thanx
-Josh
 
So I edited the string you gave me and changed field names to match what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

Josh Sharpe said:
ignore that last post

Josh Sharpe said:
I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Joshua A. Booker said:
Josh,

In the query that's in the recordsource property of the combo, you can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State] & " " & [Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at. If
you
have
trouble with this SQL syntax, try making a query based on the Address table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & " " &
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip HomePhone
All of those fields show up when I drop down but only the Street is in
there
when it's not. Is it possible to make it all visible there? If not I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I learn Access
at
the same time thanx to your help.

-Josh

Josh,

In the column widths property of the combobox, set the first column
width
to
zero. It will still be the first column, and it will still save
the
ID
in
the field, but it will not display that column to the user.
You'll
find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that order.
Set
the bound column property to 1, and the column widths property to 0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo box.

HTH,
Josh

I have an Address look-up combo box on a form. When it drops
down
it selected
it entered
than
 
Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on tblAddress and paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State] & " " &
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo to the query
name.

HTH,
Josh

Josh Sharpe said:
So I edited the string you gave me and changed field names to match what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

Josh Sharpe said:
ignore that last post

Josh Sharpe said:
I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] &
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the combo, you can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State] & " " &
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at. If you
have
trouble with this SQL syntax, try making a query based on the Address
table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & " " &
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip HomePhone
All of those fields show up when I drop down but only the Street
is
not
I down data
the
 
Josh,

You can change the column count property of the combo to 2 to remove the
empty columns.

Josh

Josh Sharpe said:
Well, now it displays nice, but the drop down is only displaying on column,
the street address, It also has 4 other blank columns.


Joshua A. Booker said:
Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] & " "
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on tblAddress and paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State] & " " &
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo to the query
name.

HTH,
Josh

Josh Sharpe said:
So I edited the string you gave me and changed field names to match what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] &
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

ignore that last post

I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [Stat
e]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the combo,
you
can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State] &
"
"
&
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at. If
you
have
trouble with this SQL syntax, try making a query based on the Address
table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & " " &
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip HomePhone
All of those fields show up when I drop down but only the
Street
is
in
there
when it's not. Is it possible to make it all visible there?
If
not
I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I learn
Access
at
the same time thanx to your help.

-Josh

Josh,

In the column widths property of the combobox, set the first
column
width
to
zero. It will still be the first column, and it will still save
the
ID
in
the field, but it will not display that column to the user.
You'll
find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that
order.
Set
the bound column property to 1, and the column widths
property
to
0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo box.

HTH,
Josh

I have an Address look-up combo box on a form. When it drops
down
it
displays all of the fields Street/City etc and when it is
selected
it
stores
the primary key in the field. That's all fine and dandy
but
is
there
a
way
to make it display the Street/City info but still store
the
data
the
same
way???

It'd be easier for a data-entry to see the data they just
entered
than
a
little ol' number.

Thanx
-Josh
 
I promise this is the last on this thread

The combo box is working now, I modifiedit slightly. Before when i was
copying the value over from the Address form using forms!frmFormA!AddressID
= Me!AddressID it was working. But now that I've changed the combo box so
much that no longer updates the field I tried doing something such as:

Forms!formA!AddressID = Me!StreetAddress& " " Me!City ...etc

but it didn't work.
How do I do this?

Joshua A. Booker said:
Josh,

You can change the column count property of the combo to 2 to remove the
empty columns.

Josh

Josh Sharpe said:
Well, now it displays nice, but the drop down is only displaying on column,
the street address, It also has 4 other blank columns.


Joshua A. Booker said:
Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State] &
"
"
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on tblAddress and paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State] & "
"
&
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo to the query
name.

HTH,
Josh

So I edited the string you gave me and changed field names to match what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

ignore that last post

I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[Stat
e]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the combo, you
can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State]
&
"
"
&
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking
at.
If
you
have
trouble with this SQL syntax, try making a query based on the
Address
table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] & "
"
&
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip
HomePhone
All of those fields show up when I drop down but only the Street
is
in
there
when it's not. Is it possible to make it all visible there? If
not
I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I learn
Access
at
the same time thanx to your help.

-Josh

Josh,

In the column widths property of the combobox, set the first
column
width
to
zero. It will still be the first column, and it will
still
save
the
ID
in
the field, but it will not display that column to the user.
You'll
find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that
order.
Set
the bound column property to 1, and the column widths property
to
0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo box.

HTH,
Josh

I have an Address look-up combo box on a form. When it drops
down
it
displays all of the fields Street/City etc and when it is
selected
it
stores
the primary key in the field. That's all fine and dandy but
is
there
a
way
to make it display the Street/City info but still store the
data
the
same
way???

It'd be easier for a data-entry to see the data they just
entered
than
a
little ol' number.

Thanx
-Josh
 
Josh,

If the combo is bound to the field AddressID, and the BoundColumn property
is 1, then the data in column 1 of the combo needs to be the AddressID. Run
the query in the RowSource property to see if it shows AddressID in column1.

Set the ControlSource property of the combo to AddressID and name it
something like cboAddressID.

HTH,
Josh

Josh Sharpe said:
I promise this is the last on this thread

The combo box is working now, I modifiedit slightly. Before when i was
copying the value over from the Address form using forms!frmFormA!AddressID
= Me!AddressID it was working. But now that I've changed the combo box so
much that no longer updates the field I tried doing something such as:

Forms!formA!AddressID = Me!StreetAddress& " " Me!City ...etc

but it didn't work.
How do I do this?

Joshua A. Booker said:
Josh,

You can change the column count property of the combo to 2 to remove the
empty columns.

Josh

Josh Sharpe said:
Well, now it displays nice, but the drop down is only displaying on column,
the street address, It also has 4 other blank columns.


Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State]
&
"
"
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on tblAddress and
paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State] & "
"
&
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo to the
query
name.

HTH,
Josh

So I edited the string you gave me and changed field names to
match
what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[State]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

ignore that last post

I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[Stat
e]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the
combo,
you
can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " &
[State]
&
"
"
&
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking at.
If
you
have
trouble with this SQL syntax, try making a query based on the
Address
table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State] &
"
"
&
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip
HomePhone
All of those fields show up when I drop down but only the Street
is
in
there
when it's not. Is it possible to make it all visible
there?
If
not
I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this as I
learn
Access
at
the same time thanx to your help.

-Josh

Josh,

In the column widths property of the combobox, set the first
column
width
to
zero. It will still be the first column, and it will still
save
the
ID
in
the field, but it will not display that column to the user.
You'll
find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State columns in that
order.
Set
the bound column property to 1, and the column widths property
to
0,1,1.
This will save the ID even though it isn't displayed.

You'll find this is common practice for almost every combo
box.

HTH,
Josh

I have an Address look-up combo box on a form. When it drops
down
it
displays all of the fields Street/City etc and when it is
selected
it
stores
the primary key in the field. That's all fine and
dandy
but
is
there
a
way
to make it display the Street/City info but still
store
the
data
the
same
way???

It'd be easier for a data-entry to see the data they just
entered
than
a
little ol' number.

Thanx
-Josh
 
I'm trying to do the same thing now with a different combo box - but this
combo box is the one that is circularly related. I've pretty much figured
out all the code you sent to me except the AS clause. I'm not sure where
you got the DisplayAddress string from. Where did you get that so I can
apply why you gave me to other combo boxes??

The string you gave me, and i've since modified:

SELECT tblAddress.AddressID, [StreetAddress] & " " & [City] & ", " & [State]
& " " & [ZipCode] & " " & [HomePhone] AS DisplayAddress,
tblAddress.StreetAddress, tblAddress.City, tblAddress.State,
tblAddress.ZipCode, tblAddress.HomePhone FROM tblAddress;

Is DisplayAddress some property somewhere that I can't find?

The other combo box:

SELECT tblCommunity.CommunityID, [FirstName] & " " & [LastName] AS ?????,
tblCommunity.FirstName, tblCommunity.LastName FROM tblCommunity;

-Josh

Joshua A. Booker said:
Josh,

If the combo is bound to the field AddressID, and the BoundColumn property
is 1, then the data in column 1 of the combo needs to be the AddressID. Run
the query in the RowSource property to see if it shows AddressID in column1.

Set the ControlSource property of the combo to AddressID and name it
something like cboAddressID.

HTH,
Josh

Josh Sharpe said:
I promise this is the last on this thread

The combo box is working now, I modifiedit slightly. Before when i was
copying the value over from the Address form using forms!frmFormA!AddressID
= Me!AddressID it was working. But now that I've changed the combo box so
much that no longer updates the field I tried doing something such as:

Forms!formA!AddressID = Me!StreetAddress& " " Me!City ...etc

but it didn't work.
How do I do this?

Joshua A. Booker said:
Josh,

You can change the column count property of the combo to 2 to remove the
empty columns.

Josh

Well, now it displays nice, but the drop down is only displaying on
column,
the street address, It also has 4 other blank columns.


Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[State]
&
"
"
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on tblAddress and
paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State] &
"
"
&
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo to the
query
name.

HTH,
Josh

So I edited the string you gave me and changed field names to match
what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[State]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

ignore that last post

I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [Stat
e]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the combo,
you
can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " &
[State]
&
"
"
&
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is
looking
at.
If
you
have
trouble with this SQL syntax, try making a query based on the
Address
table
and paste this statement into one of the columns in design view:

DisplayAddress: [Street] & " " & [City] & ", " & [State]
&
"
"
&
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip
HomePhone
All of those fields show up when I drop down but only the
Street
is
in
there
when it's not. Is it possible to make it all visible there?
If
not
I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this
as
 
reposted as new thread

Josh Sharpe said:
I'm trying to do the same thing now with a different combo box - but this
combo box is the one that is circularly related. I've pretty much figured
out all the code you sent to me except the AS clause. I'm not sure where
you got the DisplayAddress string from. Where did you get that so I can
apply why you gave me to other combo boxes??

The string you gave me, and i've since modified:

SELECT tblAddress.AddressID, [StreetAddress] & " " & [City] & ", " & [State]
& " " & [ZipCode] & " " & [HomePhone] AS DisplayAddress,
tblAddress.StreetAddress, tblAddress.City, tblAddress.State,
tblAddress.ZipCode, tblAddress.HomePhone FROM tblAddress;

Is DisplayAddress some property somewhere that I can't find?

The other combo box:

SELECT tblCommunity.CommunityID, [FirstName] & " " & [LastName] AS ?????,
tblCommunity.FirstName, tblCommunity.LastName FROM tblCommunity;

-Josh

Joshua A. Booker said:
Josh,

If the combo is bound to the field AddressID, and the BoundColumn property
is 1, then the data in column 1 of the combo needs to be the AddressID. Run
the query in the RowSource property to see if it shows AddressID in column1.

Set the ControlSource property of the combo to AddressID and name it
something like cboAddressID.

HTH,
Josh
box
so
much that no longer updates the field I tried doing something such as:

Forms!formA!AddressID = Me!StreetAddress& " " Me!City ...etc

but it didn't work.
How do I do this?

Josh,

You can change the column count property of the combo to 2 to remove the
empty columns.

Josh

Well, now it displays nice, but the drop down is only displaying on
column,
the street address, It also has 4 other blank columns.


Sorry, I left out a '&' before HomePhone.

Try this:
SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[State]
&
"
"
& [ZipCode] & " " & [HomePhone] AS AddressDisplay FROM tblAddress;

If that doesn't work, try creating a new query based on
tblAddress
and
paste
this into a column in design view:

AddressDisplay: [StreetAddress] & " " & [City] & ", " & [State]
&
"
"
&
[ZipCode] & " " & [HomePhone]

Then test and save the query and set the rowsource of the combo
to
the
query
name.

HTH,
Josh

So I edited the string you gave me and changed field names to match
what
they are, and now when i drop down the box it shows one row of blank
fields...even though there are multiple records in the table.

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " & [State]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM tblAddress;

I used this

-Josh

ignore that last post

I took what you gave me and changed fields/table names:

SELECT [AddressID], [StreetAddress] & " " & [City] & ", " &
[Stat
e]
&
"
"
& [ZipCode] & " " [HomePhone] AS AddressDisplay FROM
tblAddress;

and it's giving me a Syntax error (missing operator)
:(
-Josh


Josh,

In the query that's in the recordsource property of the combo,
you
can
concatenate the other fields into a single column like this:

SELECT [AddressID], [Street] & " " & [City] & ", " & [State]
&
"
"
&
[Zip]
& " " [HomePhone] AS AddressDisplay FROM Address;

Where Address is the name of the table the combo is looking
at.
If
you
have
trouble with this SQL syntax, try making a query based
on
the
Address
table
and paste this statement into one of the columns in design
view:

DisplayAddress: [Street] & " " & [City] & ", " &
[State]
&
"
"
&
[Zip]
&
"
" [HomePhone]

You can use this query as the recordsource of the combo.

HTH,
Josh


The fields in the Address table are: Street City State Zip
HomePhone
All of those fields show up when I drop down but only the
Street
is
in
there
when it's not. Is it possible to make it all visible there?
If
not
I
could
deal but it'd be nice.

Btw, thanx a lot- I'm making a lot of progress on this
as
I
learn
Access
at
the same time thanx to your help.

-Josh

message
Josh,

In the column widths property of the combobox, set the
first
column
width
to
zero. It will still be the first column, and it will
still
save
the
ID
in
the field, but it will not display that column to the
user.
You'll
find
this is common practice for almost every combo box.

Example: A combo has AddressID, City & State
columns
When
when
 
Back
Top