Re: Combination box



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


.



Relevant Pages

  • Re: Combination box
    ... The name of the field Produced amount is Monday. ... So the code in the After Update Event for the combo will be something like ... WeekNumber in your datasource table - look up the NZ function for instance. ... I have a simple form coding problem. ...
    (microsoft.public.access.formscoding)
  • Re: form field writing to more than 1 table
    ... you don't have to worry about the table the form is bound to. ... > table2 updated. ... If this is an amount ... then it should go in the After Update event of ...
    (microsoft.public.access.formscoding)
  • Simple If Statement Help Needed
    ... I have a control on my form named Rate ... I was going to put this on the after update event ... If the amount in this box is not 32.50 or 27.50 I need a message box to ...
    (microsoft.public.access.forms)
  • Re: Validation of Data from a list box
    ... assuming you are using the Before Update event of ... the Amount textbox... ... would not require the user to enter a -ve amount. ... Steve Schapel, Microsoft Access MVP ...
    (microsoft.public.access.formscoding)