Make things visible

bunji

Registered User.
Local time
Today, 19:22
Joined
Apr 26, 2005
Messages
124
Hi,

I have a report with several fields and unbound boxes. I would like some to be visible and others to not be dependant if a field is true or not.

Here is my code, but i get the error

Run Time error '2427'

'You entered an expression that has no value'

Code

Code:
Private Sub Report_Open(Cancel As Integer)

    If Me.Based_Customer = True Then
    
    Me.WO_Number_IfBased.Visible = True
    Me.Wo_Number_IFbased_Label.Visible = True
    Me.CustomerWA.Visible = False
    Me.CustomerWA_Label.Visible = False
    Me.WO_Number.visibe = False
    Me.NotBasedTxt.Visible = False
    Me.IsBasedtxt.Visible = True
    Me.Customer_Scheduled_WO = DLookup("[Cusotmer_Shceduled_WO]", "tblACDetails", "[AC_Ser_No] = Reports![rptAirFrame]![AC_SN]")
    Me.Customer_Scheduled_WO.Visible = True
    
    End If
    
End Sub

What am i doing wrong!!
 
bunji said:
Code:
    Me.WO_Number.[b]visibe[/b] = False

What am i doing wrong!!

Not using VBA's autocomplete feature, which saves you from making embarrassing syntax errors ;-)
 
I dont understand the error highlighted the If statement not the .visible?
 
.visible or visibe is not in the auto complete featrue so thats why i wrote it.
 
The real problem was that it was in the report open and not the format,

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
 

Users who are viewing this thread

Back
Top Bottom