Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to insert a value in a field in datawindow

Status
Not open for further replies.

montjoile

Programmer
May 23, 2011
23
CO
::If the user enters a valid employee code, the next field (which is the name) has to be filled with the corresponding name what matches with the code. Then the user saves the new registry with all that info

Im using a datawindow freeform to do that. My question is that I don't know how to get the value of the name field and change it.
I was thinking that I can probably do it the same way that I get the code that the user enters, which is in this way:
if getcolumnname()="codigo_emp" then
ls_codigo=integer(data)
I tried with his:
if getcolumnname()="nombre_emp" then
data=ls_nombre
but I doesn't works.
Help please
 
jejeje nevermind, I already fixed it with setitem()
 
I'm getting the feeling that the code you showed is from itemchanged event. (because of the use of DATA).

Check out the help about "return values for itemchanged event". it might be usefull. If you are doing a setitem on the column that is "changing" (dwo.name, not fully changed yet, since the itemchanged event has not finished), you should do a return 2 after changing the value with setitem to accept your newly assigned value.

regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top