2/16/2025 6:05:50 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
|
|
|
|
Total Control of Lookups![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 08 Apr 06 6:01 AM
|
fiogf49gjkf0d With this site there is a thread called Total Control ..."
Amongst the answers is L
If Not Lookup Is Nothing Then '... End If
Can you please elabortate on this. I am trying to prevent the SLX error when a user cancels a lookup. In fact I would ideally like to cancel the opening of the looku at all - if other data fails a test.
|
|
|
|
Re: Total Control of Lookups![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 12 Apr 06 2:40 PM
|
amlodipin teva amlodipin sandoz open fiogf49gjkf0d Hi Mike,
The code you metion is to test an object returned by LookupItemWithConditionByID. There was a comment made about an error being raised when the ID property was accessed from the object when the lookup was cancelled (the object returned was null). The code you mention is an attempt to check for a valid object (ie: the lookup was not cancelled) returned by the function. You could also use (as was also suggested in the comments of that article) to use TypeName, such as:
If TypeName(Lookup) = "Link" Then id = Lookup.ID End If
However, another thing you could try is just to add an On Error Resume Next, check for a value returned by the ID property, if blank do nothing (and the On Error Resume Next would prevent the error if the object is null). |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|