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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

When i change ComboBox, my textboxes should change accordingly, ho



 
 
Thread Tools Display Modes
  #1  
Old January 14th, 2008, 05:49 AM posted to microsoft.public.access.forms
Ali
external usenet poster
 
Posts: 221
Default When i change ComboBox, my textboxes should change accordingly, ho

I have a form with 4 items.

-ID
-Name
-Nationality
-Department

When i change ComboBox (ID)

i want my textboxes to change accordingly to show thier corresponding Name,
Nationality and Department.

How can this be done using a form.

Please let me know the steps. Thanks a lot exerpt !

--
Allen Phailat Wongakanit
  #2  
Old January 14th, 2008, 06:14 AM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default When i change ComboBox, my textboxes should change accordingly, ho

"ali" wrote in message
...
I have a form with 4 items.

-ID
-Name
-Nationality
-Department

When i change ComboBox (ID)

i want my textboxes to change accordingly to show thier corresponding
Name,
Nationality and Department.

How can this be done using a form.

Please let me know the steps. Thanks a lot exerpt !



There are several ways this might be done, depending on what you want to
accomplish. If the form's purpose is to allow you to edit -- not just
view -- the name, nationality, and department for people whose ID you select
from the combo box, then you would be most likely be using the combo box to
find a record. The combo box wizard will build such a combo box for you, if
you tell it you want a combo box to "find a record on my form". The form,
in this case, would be based on the same table that combo box uses as its
recordsource.

But instead of that, you may just want to use those text boxes to show data
about the person selected in the combo box, without intending to edit that
information. In that case, you can include the extra information as
additional columns in the combo box's rowsource query, and then set up the
text boxes to pull the information right out of the combo box. In this
case, you would set the combo box to the following properties:

Row Source: SELECT ID, Name, Nationality, Department FROM YourTable
(of course, change "YourTable" to the name of your rowsource table)
Column Count: 4
Bound Column: 1

Then set the Control Source properties of your text boxes to:

For the Name text box: =[cboID].[Column](1)
For the Nationality text box: =[cboID].[Column](2)
For the Department text box: =[cboID].[Column](3)

Note that, in the above, I'm using "cboID" as the name of your combo box.
You should use the actual name of your combo box in that position.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #3  
Old January 14th, 2008, 06:15 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default When i change ComboBox, my textboxes should change accordingly, ho

Allen,
there is a download with a database sample showing how to do this at
ComboChoosesRecord.mdb ( beginner )

This illustrates how to have a combo box in which you can choose a value and
have that record appear in the form.

Jeanette Cunningham


"ali" wrote in message
...
I have a form with 4 items.

-ID
-Name
-Nationality
-Department

When i change ComboBox (ID)

i want my textboxes to change accordingly to show thier corresponding
Name,
Nationality and Department.

How can this be done using a form.

Please let me know the steps. Thanks a lot exerpt !

--
Allen Phailat Wongakanit



  #4  
Old January 14th, 2008, 07:13 AM posted to microsoft.public.access.forms
Ali
external usenet poster
 
Posts: 221
Default When i change ComboBox, my textboxes should change accordingly

Thanks a lot Jeanette,
where/ how do i get the database sample ?

is there an URL given ?
--
Allen Phailat Wongakanit


"Jeanette Cunningham" wrote:

Allen,
there is a download with a database sample showing how to do this at
ComboChoosesRecord.mdb ( beginner )

This illustrates how to have a combo box in which you can choose a value and
have that record appear in the form.

Jeanette Cunningham


"ali" wrote in message
...
I have a form with 4 items.

-ID
-Name
-Nationality
-Department

When i change ComboBox (ID)

i want my textboxes to change accordingly to show thier corresponding
Name,
Nationality and Department.

How can this be done using a form.

Please let me know the steps. Thanks a lot exerpt !

--
Allen Phailat Wongakanit




  #5  
Old January 14th, 2008, 08:00 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default When i change ComboBox, my textboxes should change accordingly

http://www.rogersaccesslibrary.com/d...osesRecord.mdb

Jeanette Cunningham


"ali" wrote in message
...
Thanks a lot Jeanette,
where/ how do i get the database sample ?

is there an URL given ?
--
Allen Phailat Wongakanit


"Jeanette Cunningham" wrote:

Allen,
there is a download with a database sample showing how to do this at
ComboChoosesRecord.mdb ( beginner )

This illustrates how to have a combo box in which you can choose a value
and
have that record appear in the form.

Jeanette Cunningham


"ali" wrote in message
...
I have a form with 4 items.

-ID
-Name
-Nationality
-Department

When i change ComboBox (ID)

i want my textboxes to change accordingly to show thier corresponding
Name,
Nationality and Department.

How can this be done using a form.

Please let me know the steps. Thanks a lot exerpt !

--
Allen Phailat Wongakanit






 




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 09:50 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.