I have a form where i select via a combo box if a product has been inspected, if it has, additional controls are then made visible.
If Me.Inspection_Completed = "Yes" Then
Me.Date_Inspection_Comp.Visible = True
Me.Date_Inspection_Comp = Me.Dateinsp
Me.Inspector.Visible = True
Me.Qty_Inspected.Visible = True
Me.OK.Visible = True
Me.Inspection_Outcome.Visible = True
Me.Qty.Visible = True
ElseIf Me.Inspection_Completed = "no" Then
Me.Date_Inspection_Comp.Visible = False
Me.Inspector.Visible = False
Me.Qty_Inspected.Visible = False
Me.OK.Visible = False
Me.Inspection_Outcome.Visible = False
Me.Qty.Visible = False"
i tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.
Any ideas of a easy way to call this or do i need to tyoe out again and again.
If Me.Inspection_Completed = "Yes" Then
Me.Date_Inspection_Comp.Visible = True
Me.Date_Inspection_Comp = Me.Dateinsp
Me.Inspector.Visible = True
Me.Qty_Inspected.Visible = True
Me.OK.Visible = True
Me.Inspection_Outcome.Visible = True
Me.Qty.Visible = True
ElseIf Me.Inspection_Completed = "no" Then
Me.Date_Inspection_Comp.Visible = False
Me.Inspector.Visible = False
Me.Qty_Inspected.Visible = False
Me.OK.Visible = False
Me.Inspection_Outcome.Visible = False
Me.Qty.Visible = False"
i tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.
Any ideas of a easy way to call this or do i need to tyoe out again and again.