Auto Update Text box

  • Follow


Hello,

I'm building my first ever Access datebase and I have a form called Enter 
Comp. In this form I have a combo box called Combo9 that gets it's data from 
a table called CompType. In the Table CompType I have three fields. The Comp9 
combo box gets it data for the second field in the table the field is called 
Compdescription. On the form Enter Comp I also have a text box called 
CompAmount. I want this text box to auto populate once a user choices a 
comptype from the Combo9 combo box with the number that is in the Points 
table on the CompType table. Currently on the CompType table the fist filed 
is called ComptypeID this number starts at 1 and auto counts to the next 
number. So like on the table ComptypeID is 1, CompDescription is Buffet and 
Points is 200. So again what I'm looking for is when a user selects the 
Buffet on the Combo9 combo box on the form the text box CompAmount auto 
updats to 200. I hope this makes scense.
0
Reply Utf 1/31/2010 11:51:01 PM

On Sun, 31 Jan 2010 15:51:01 -0800, MWDAN
<MWDAN@discussions.microsoft.com> wrote:

I am assuming your dropdown already has all 3 columns from CompTypes.
You may choose to display the Points or not.
Then in the Points textbox set the ControlSource to:
=cboCompType.Column(2)
(notice how I renamed the combobox with a descriptive name)

Now here is the rub: in most database designs Points does not belong
in the tblComps table. This is because given a CompTypeID it can be
looked up in tblCompTypes. If you already designed your db: good for
you!

-Tom.
Microsoft Access MVP



>Hello,
>
>I'm building my first ever Access datebase and I have a form called Enter 
>Comp. In this form I have a combo box called Combo9 that gets it's data from 
>a table called CompType. In the Table CompType I have three fields. The Comp9 
>combo box gets it data for the second field in the table the field is called 
>Compdescription. On the form Enter Comp I also have a text box called 
>CompAmount. I want this text box to auto populate once a user choices a 
>comptype from the Combo9 combo box with the number that is in the Points 
>table on the CompType table. Currently on the CompType table the fist filed 
>is called ComptypeID this number starts at 1 and auto counts to the next 
>number. So like on the table ComptypeID is 1, CompDescription is Buffet and 
>Points is 200. So again what I'm looking for is when a user selects the 
>Buffet on the Combo9 combo box on the form the text box CompAmount auto 
>updats to 200. I hope this makes scense.
0
Reply Tom 2/1/2010 12:30:20 AM


1 Replies
268 Views

(page loaded in 0.069 seconds)


Reply: