Trying to place 2 after update procedures in 1 combobox

patentinv

Registered User.
Local time
Today, 05:55
Joined
Aug 29, 2005
Messages
29
Hello, I ran into another programming road block.
I currently have a combo box that is bound to a table with 2 fields and has 4 different options/records in it, with an after update procedure, that has different calculations for each record. I want to add a Dlookup command that will display
the record that is chosen and it will need to be placed in the
after update procedure of the combo box also. Is this possible?

Code that is currently in the after update procedure of the combo box.

Dim prp As Property, ctl As Control

Set prp = Me!cboRidge.Properties("ListIndex")
Set ctl = Me.txtRidgetot

If prp = 0 Then
ctl = ([txtridge]*100/30)+0.4
ElseIf prp = 1 Then
ctl = ([txtridge]*100/45)+0.4
ElseIf prp = 2 Then
ctl = ([txtridge]*100/30)+0.4
Else
ctl = ([txtridge]*100/30)+0.4
End If

Set ctl = Nothing
Set prp = Nothing

Code I need to add:

Me.DLookcbotile.Requery


Thanks-- any help will be very appreciated.
 
Just add the line in.
You look to have used over kill on the code a bit though:)
Code:
If Me!cboRidge.Properties("ListIndex") = 1 Then
    Me.txtRidgetot = ([txtridge] * 100 / 45) + 0.4
Else
    Me.txtRidgetot = ([txtridge] * 100 / 30) + 0.4
End If
Me.DLookcbotile.Requery

Peter
 

Users who are viewing this thread

Back
Top Bottom