Form 'OnCurrent' Event not firing properly, but does when stepping through it?? (1 Viewer)

JeffBarker

Registered User.
Local time
Today, 11:25
Joined
Dec 7, 2010
Messages
130
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! :)
 

BlueIshDan

☠
Local time
Today, 07:25
Joined
May 15, 2014
Messages
1,122
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
 

BlueIshDan

&#9760;
Local time
Today, 07:25
Joined
May 15, 2014
Messages
1,122
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[
 

JeffBarker

Registered User.
Local time
Today, 11:25
Joined
Dec 7, 2010
Messages
130
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...
 

vbaInet

AWF VIP
Local time
Today, 11:25
Joined
Jan 22, 2010
Messages
26,374
Sample form attached!

Look forward to hearing what you guys are able to come up with!!
Not sure how you expect us to test this without some data and steps to reproduce the problem.
 

Users who are viewing this thread

Top Bottom