Re: Combination box



Hi Evi

Name of combo boks is CBO2 which looks up week values in tbl_320.

The name of the field Produced amount is Monday. I also have a field
tuesday, wedensday and so on, where the same thing should happen.

When a user inputs numbers in the "Monday" field or Tuesday field and so on,
the user should by pressing a button save the input values for the week
choosen, in tbl_320.

If nothing is listed then nothing should be written in the table.

I've tried to use your code but can't realyy get it to work.

Thanks for your help
Ticotion

"Evi" wrote:

It might help you to give details such as name of combo box, name of table,
name of field for Produced Amount. it will make it easier for you to read
the code too. It also saves us having to assign names to them.

Since this is a simple coding problem, I assume you know how to use events.

So the code in the After Update Event for the combo will be something like
this

Me.ProducedAmount = (DLookup("[LookedUpValue]",
"DatasourceTable2","[WeekNumber]=" & Me.MyCombosName)

You'll need to put in the real names

You will need to decide what to do if there is nothing listed for that
WeekNumber in your datasource table - look up the NZ function for instance.
Evi

"Ticotion" <Ticotion@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5C75349C-39F8-4950-A88D-ED2D10D2E93E@xxxxxxxxxxxxxxxx
Hi

I have a simple form coding problem.

I have a combination box that contains week numbers. Furthermore I have a
field for produced amount. When a user selects a weeknumber I want the
form
to find the value in the datasource tabel, so that the input in the
produced
amount field are saved here. Can you help me?

Thank you for your help and input
Ticotion



.