SET MULTILOCKS and other SET commands should be declared in the load event of the form or in the main program.
Buffering should be set right away in the Data Environment - look for BufferModeOverride property of each table.
Good application design should have separate methods per process type i.e. add, delete, post, cancel, reports, save, restore, etc.
Also, controlsource in combobox depends on your BoundColumn property. If combobox rowsource property is "items.desc, code" and your controlsource is "invoiceitem.code" your boundcolumn should be 2.
HTH
>I have this Method run in the interactivechange event of combo1.
>
>SET MULTILOCKS ON
>=CURSORSETPROP("Buffering", 3, "intrancust")
>
>
>SEEK Thisform.Combo1.value
>
>IF FOUND()
> Thisform.Text1.VALUE = chgperkt
> Thisform.Combo2.VALUE = cut
> Thisform.Combo3.VALUE = colors
> Thisform.Combo4.VALUE = clarity
> Thisform.Edit1.VALUE = p_descript
> Thisform.Text7.VALUE = entered
> Thisform.Text6.VALUE = invoiced
> Thisform.Text5.VALUE = total_chg
> Thisform.Edit2.VALUE = transdesc
> Thisform.Text8.VALUE = company
> Thisform.Text9.VALUE = track_num
>ELSE
>= messagebox('The record you searched for is invalid and should be deleted')
> Thisform.Pageframe1.Page1.Combo4.VALUE = stocknum
>ENDIF
>
>
>Everything works beautifully - until......
>
>I want to use this same form to append as well as search. In order to do that the Controlsource property of each object must be linked to its proper field (OR DOES IT? SHOULD I MAKE A METHOD THAT USES REPLACE AND LEAVE THE CSOURCE BLANK IN EACH OBJECT?)
>
>Anyway, when I set the Controlsources and run the form, the search only gives the error messagebox. Is the Controlsource and the Rowsource fighting it out somehow?
>
>All opinions are welcome and appreciated.
>Thanks
>JD
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."