Information générale
Catégorie:
Codage, syntaxe et commandes
Forget the &. I'm pretty sure I was wrong about that. Hmmm... It's expecting a string and getting a string. Let me do some experimenting and see if I can figure it out.
-Michelle
>OK, the type(lcfieldname) is a character, but the type(&lcfieldname) is not. Is the getfldstate() function only expecting the name of the field?
>
>Jim
>
>>I thought about it some more after I posted, and it seems like it should have worked the first way since you were passing it a character type variable. Are you sure the controlsource is defined? Maybe try ? type('lcfieldname') to make sure it's a character?
>>
>>-Michelle
>>
>>
>>>PRIVATE lcfldstate, lcfiedname
>>>lcfieldname = this.controlsource
>>>lcfldstate = GETFLDSTATE(&lcfield)
>>>IF lcfldstate <> 1
>>> Thisform.textbuttons1.cmdedit.click
>>>ENDIF
>>>
>>>Michelle,
>>>
>>>I tried this an it says that the function is missing a ")".
>>>
>>>Any other ideas?
>>>
>>>Jim
>>>
>>>>>I am trying to determine when a field is changed. The code I am using is below. At runtime the controlsource = customer.contact. When the program executes line 3 I get an "function argument, type, or count is invalid" error. The parameter that is passed to the getfldstate() function is a fieldname. Obviously I am doing something wrong, but I don't know what.
>>>>>
>>>>>Any ideas anyone?
>>>>>
>>>>>Jim
>>>>>
>>>>>
>>>>>PRIVATE lcfldstate, lcfiedname
>>>>>lcfieldname = this.controlsource
>>>>>lcfldstate = GETFLDSTATE(lcfieldname)
>>>>>IF lcfldstate <> 1
>>>>> Thisform.textbuttons1.cmdedit.click
>>>>>ENDIF
>>>>
>>>>I _think_ that it's expecting the name as a string, as in ("MyField"). I'm not positive about this. My brain is refusing to cooperate at the moment, so I can't think how to do that with a variable. Maybe &lcfieldname?
>>>>
>>>>-Michelle
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement