General information
Category:
Forms & Form designer
>><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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only