Zero value currency control

Okay - I have to go off line now. I would suggest adding in before the Select Case section a debug.print of all the sub form values you are trying to compare, and see what values you get returned.
 
if the value of price1 is 0.0001 then the code can be accepted, but not 0
 
If you don't know how to use breakpoints type 'stop' at the beginning of your procedure.

Code:
Private Sub ITEMCODE_AfterUpdate()
     stop
      Me.ITEMSQRYSALESSUB.Requery

When the code fires it will stop at that point. Press F8 to follow the execution to debug.

If the code doesn't stop, your procedure has been disconnected from the controls event. Go to the control's property sheet and make sure that the correct event property reads [Event Procedure].
 
Actually what is a 'Zero value currency control' exactly? Are you using a third party control or is it a normal textbox?
 
the control is textbox,

now the stop is working everywhere except this point

If [CUSTOMERNAMESEARCHFROMSALES2SUB]![PRICETYPE] = "PRICE1" Then


If ITEMSQRYSALESSUB!PRICE1 = 0 Then
Stop

DoCmd.OpenForm "ZEROPRICEPOPUP"
Else:
 
now the stop is working everywhere except this point

Msgbox"The Value of [CUSTOMERNAMESEARCHFROMSALES2SUB]![PRICETYPE] is ;" & [CUSTOMERNAMESEARCHFROMSALES2SUB]![PRICETYPE] ,"Here is your value!"
If [CUSTOMERNAMESEARCHFROMSALES2SUB]![PRICETYPE] = "PRICE1" Then


If ITEMSQRYSALESSUB!PRICE1 = 0 Then
Stop

DoCmd.OpenForm "ZEROPRICEPOPUP"
Else:
What value do you get if you add the green code above.
And it doesn't look like you have changed you code. I'm pretty sure you can't refer to a sub form control (the part in red) in the way you are trying to. See my previous post about the correct syntax.
 

Users who are viewing this thread

Back
Top Bottom