murray83
Games Collector
- Local time
- Today, 10:04
- Joined
- Mar 31, 2017
- Messages
- 728
Morning you lovely people, have been looking at this StrComp Function
and i think i understand it but i cant seem to get it to work, please see my code and explanation below
so what i want to happen is when the criteria is met like in the example shown below it would show a label saying whether its a JS owned or vendor owned, the criteria for this is. if supplier and owner are different then its JS Owned but as can see that in the example they are both the same so should show the Vendor Owned label
cheers for reading and hope all of us are well
and i think i understand it but i cant seem to get it to work, please see my code and explanation below
Code:
Private Sub cmbSKU_AfterUpdate()
Dim LResult As Integer
Dim LResult2 As Integer
LResult = StrComp("me.txtOwnerLookUp.Value", "me.txtSupplierLookUp.Value")
LResult2 = StrComp("me.txtSupplierLookUp.Value", "me.txtOwnerLookUp.Value")
If LResult = 0 Then
Me.lblVendorOwned.Visible = True
Me.lblJSOwned.Visible = False
Else
If LResult2 = 1 Then
Me.lblVendorOwned.Visible = False
Me.lblJSOwned.Visible = True
End If
End If
Me.Requery
End Sub
so what i want to happen is when the criteria is met like in the example shown below it would show a label saying whether its a JS owned or vendor owned, the criteria for this is. if supplier and owner are different then its JS Owned but as can see that in the example they are both the same so should show the Vendor Owned label
cheers for reading and hope all of us are well