value from query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a cost form where the work centre rate changes depending on type of
costing ie pharma or toiletry . the form has drop down box for type selection
and another for workcentre. i have wriiten following code
Private Sub TYPE_AfterUpdate()
If Me.TYPE = "PHARMA" Then
Me.Rateperhour= "76.3387"
Else
Me.rateperhour = "48.0016"
End If
End Sub
which works but as extracting rates from mrp system I have created query
with rates in it is it possible to assign the value from query "process
vesssels" field RunTimeRate1 for pharma RunTimeRate2 for toiletries so if
rats change do not have to manually update code
Thanks
tina
 
tina said:
I have a cost form where the work centre rate changes depending on type of
costing ie pharma or toiletry . the form has drop down box for type selection
and another for workcentre. i have wriiten following code
Private Sub TYPE_AfterUpdate()
If Me.TYPE = "PHARMA" Then
Me.Rateperhour= "76.3387"
Else
Me.rateperhour = "48.0016"
End If
End Sub
which works but as extracting rates from mrp system I have created query
with rates in it is it possible to assign the value from query "process
vesssels" field RunTimeRate1 for pharma RunTimeRate2 for toiletries so if
rats change do not have to manually update code


I think you might be able to do this, but it depends on the
fields in the query and tables along with the Relationship
between them.

Hopefully there is a way to Join the workcentre, type and
process records so that the rate value can be included with
the type in the combo box's RowSource. This would allow you
to retrieve the the rate using a reference to the combo
box's Columns property.
 
Back
Top