Autofil a Text Box

B

Brampton76

I have a Form with 2 Combo Boxes and one Text Box. The Combo Boxes take data
from a Table with 3 columns. When Combo Box 1 selection is made and Combo
Box 2 selection is made I would like the Text Box to autofill with the data
from the third column. All 3 selections are then saved so that I can do some
calculations etc.

I have been tinkering with the AfterUpdate in the second Combo Box but going
round in circles and would be grateful for some advice.
 
B

Brampton76

Hi Damon,

Field1 Field2 Field3
aaa 123 blue
aaa 345 red
aaa 678 green
aaa 910 black
aaa 112 yellow
bbb 123 blue
etc

Field1 will have the same data in groups of 5, Field2 will have a different
option for each of the contents of Field1 (5 diferent options) and Field3 is
again a different content (a cash amount). My aim would be to select 'aaa'
'910' and get the Text Box to auto fill with 'black'.
 
B

Brampton76

Damon,

Many thanks, this is new to me so I will try this tomorrow. I seem to have
an awful lot to learn! Again, many thanks for your time.
 
B

Brampton76

I am nearly there now I think! I can see the 2 fields in the combo box and
then make a selection - however, only the first field remains after the
selection. Then, I entered the following into the after update event of the
combo box me.txtCost=me.cboOption.column(3) but received an error message
indicating that access cannot find the macro 'me'. I appear to be so close
yet so far! Any further thoughts please?
 
B

Brampton76

Many thanks Damon. Still no joy though. My
Forms!frmCompetitionEntry.txtcost.Value=Forms!frmCompetitionEntry.cboOption.Column(3)
(there is a primary key) continues to give me the macro not found message so
I put a '=' at the beginning - but still no auto fill. I think I have taken
up enough of your time now, and will try and find another way around the
question until I have learnt much more about Access. Again, many thanks for
your time.
 
H

Herman Wellington

Hi Damon,

I read thru your conversation and found it is same for my case. But I have
subform in it. Will it cause any problem and how should I go around it.

Thanks.
Herman
 

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