Subject Re: [IBO] Cannot post current row
Author Helen Borrie
At 10:41 AM 30-11-00 +0100, you wrote:
>I have got a problem using a TIB_UpdateBar:
>I have some TIB_Edits, a TIB_Datasource an a
>TIB_Query in a form and it works well to insert
>When I change a record and click the post button
>of the TIB_Updatebar, the data is saved.
>But then I defined a hotkey which calls TIB_UpdateBar.BtnClick(ubPost)
>so that the user does not need to use the mouse.
>But when pressing the key I get the error message "Cannot post current
>Anyone? :-(

I think you are going to have to add more code to your hotkey handler, i.e.
before you let it call the buttonclick, first test
if (MyDataset.State in ([dssEdit, dssInsert, dssDelete])) then

Or you could access the NeedToPost property of the ib_datasource, e.g.

with IB_UpdateBar do
if Datasource.NeedToPost then


All for Open and Open for All
InterBase Developer Initiative ยท