Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically adding objects
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00013536
Message ID:
00013537
Views:
27
Sorry,

This code is in the init() of the form!

Jon



>Hi
>
>I have a form that displays personal information. This form will display AS IS as long as the user has standard access level. However, when a higher access user is logged on, an additional listbox containing all the records in the table. The problen I am having is assigning the rowsource and control sources from the table. My code looks like this;
>
>LOCAL lcUserLevel, ;
> lcAlias
>
>lcUserLevel = oApp.getUserLevel()
>lcAlias = thisform.dataenvironment.initialselectedalias
>
>IF lcUserLevel ALLTRIM("Individual")
>*--Resize my form
>thisform.width = 635
>thisform.cntInfo.left = 173
>
>thisform.AddObject('lstList','listwithssan')
>thisform.lstList.left = 0
>thisform.lstList.top = 0
>thisform.lstList.lstNames.RowSource = ;
> 'lcAlias'+'.'+ALLTRIM(lastname)+', '+'lcAlias'+'.'+;
> SUBSTR(firstname,1,1)
>thisform.lstList.txtSSAN.ControlSource = 'lcAlias' + '.'+ ssan
>ENDIF
>
>thisform.lstList.visible = .T.
>
>It displays just fine, but I am missing the boat here on refrencing the table (appropriately!) in the data environment to display the value in the new object.
>
>Any help greatly appreciated
>
>Jon
Jon Paskett

Microsoft Certified Systems Engineer
We all have to start somewhere...
Sometimes over again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform