Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Dataenvironment.AddObject & Buffering
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00063231
Message ID:
00063740
Views:
92
>>><snip>
>>>>>That's probably because you didn't set Alias property yet.
>>>>>Thisform.Dataenvironment.Addobject("CursorX","Cursor")
>>>>>Thisform.Dataenvironment.CursorX.Buffermodeoverride =2
>>>>>Thisform.Dataenvironment.CursorX.Alias="Cli_name"
>>>
>>>thisform.dataenvironment.closetables()
>>>thisform.dataenvironment.opentables()
>>>
>>>This is the only way I could get it to work.
>>>
>>>
>>>
>>>Greg
>>
>>You mean you got it to work!!!??? This is my code:
>>
>> WITH Thisform
>> WITH .Dataenvironment
>> .Addobject([Cli_name],[Cursor])
>> .Cli_name.Buffermodeoverride =2
>> .Cli_name.Alias="Cli_name"
>> .Closetables
>> .Opentables
>> ENDWITH
>> .Field_name.ControlSource =[Cli_name.Field_name]
>> .ChkField_core.ControlSource=[Cli_name.Field_core]
>> .ChkField_mand.ControlSource=[Cli_name.Field_mand]
>> .SpnField_len.ControlSource =[Cli_name.Field_len]
>> .SpnField_dec.ControlSource =[Cli_name.Field_dec]
>> .NameFile =[Cli_name]
>> .MainFile =[Clients]
>> .CboFilename.Value =[Clients]
>> .Objsrefresh
>> ENDWITH
>>
>>And it poops out at .field_name.controlsource =[cli_name.field_name], where it says "Alias 'Cli_name' not found.
>>
>>JR
>
>
>Here's the code that I used.
>
>WITH Thisform.DataEnvironment
>
> .AddObject("Cursor1", "cursor")
> WITH .Cursor1
> .CursorSource = goApp.cDataFileDir + Thisform.cTableName
> .Alias = Thisform.cTableName
> .BufferModeOverRide = 5
> ENDWITH
>
> .InitialSelectedAlias = Thisform.cTableName
>
> .CloseTables()
> .OpenTables()
>ENDWITH
>
>My apologies if I missed this somewhere, but what kind of control is field_name?
>
>Greg

Field_name is a form-level text box.

I'll try your suggestion--Thank you!

JR
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Reply
Map
View

Click here to load this message in the networking platform