Form 'OnCurrent' Event not firing properly, but does when stepping through it??

easiest way to add a watch is to highlight the control name and right-click/Add Watch, this will open the Watch window, add one for each control and then put a breakpoint in the code and step through the If statements taking note which route the code takes, look at the values of the controls in the Watch window and common sense will tell you if the values are being evaluated correctly

David

Ah, sorry guys - my superior is currently in the database, having a play...so it's locked out...will try again soonest! :)
 
I don't know but this is a shot in the dark.

Maybe something to do with the case sensitivity during runtime of your

Code:
    If Me.txtAccountsStatus = "Account on Stop" Then
        Me.cmdProceed.Visible = False
        MsgBox "Account is on stop" & Chr(13) & "You can view orders but can not place orders for this customer.", vbInformation
    Else
        If Me.txtNet <> 0 Then
            If Me.txtNet <> Forms![COLOR="Red"]frmorderentry[/COLOR]![tblAllocation_subform].Form.txtSumAmount Then
                Me.cmdProceed.Visible = False
            Else
                Me.cmdProceed.Visible = True
            End If
        Else
            Me.cmdProceed.Visible = True
        End If
    End If

frmOrderEntry
 
Also what is the difference between:
Code:
Me.txtNet <> Forms!frmorderentry![tblAllocation_subform].Form.txtSumAmount

and

Code:
Me.txtNet <> Me.tblAllocation_subform.Form.txtSumAmount
[/CODE[
 
Also what is the difference between:
Code:
Me.txtNet <> Forms!frmorderentry![tblAllocation_subform].Form.txtSumAmount

and

Code:
Me.txtNet <> Me.tblAllocation_subform.Form.txtSumAmount
[/CODE[[/QUOTE]

Hi Dan,

Thanks for your suggestions regards Case Sensitivity, once I'm able to access the database again I'll have a play with that.

Regards the above though, there's no difference, save for the latter not having the 'Forms!frmOrderEntry!' prefix...why's that? I'm guessing it's something I've missed somewhere...
 

Users who are viewing this thread

Back
Top Bottom