A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box Query Help



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2010, 12:00 AM posted to microsoft.public.access.queries
Scott_66701 via AccessMonster.com
external usenet poster
 
Posts: 6
Default Combo Box Query Help

I have a combo box with hospital names in it. I am wanting to select a
hospital from the combo box and have the the address text box automatically
fill in with the hospitals address. How can I go about doing this. Please
help.

--
Message posted via http://www.accessmonster.com

  #2  
Old May 30th, 2010, 08:33 PM posted to microsoft.public.access.queries
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Combo Box Query Help

On Sat, 29 May 2010 23:00:34 GMT, "Scott_66701 via AccessMonster.com"
u54193@uwe wrote:

One way is to have an extra hidden column in the combobox. For example
the rowsource would be a query like this:
select HospitalID, HospitalName, Address & " " & City & " " & State &
" " & Zip as FullAddress
from tblHospitals
(note how I concatenate the various address fields into one column)
Design your dropdown and set the ColumnWidths to "0;1;0" so only the
HospitalName is showing.
Then in your Address textbox set the ControlSource to automatically
pick up the address column:
=myDropdown.Column(2)
(of course you change myObjectNames to yours)

-Tom.
Microsoft Access MVP


I have a combo box with hospital names in it. I am wanting to select a
hospital from the combo box and have the the address text box automatically
fill in with the hospitals address. How can I go about doing this. Please
help.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.