PDA

View Full Version : Updating bounded controls manually



toom
04-17-2011, 03:55 AM
I'm filling a table with data. And I have some control elements like textboxes or comboboxes that are bounded to the fields in that table.

Actually the table contains always exactly one row of data. But that data can change depending on the action the user takes. If the user alters the data in that table I want to get the bounded fields updated. But instead the control elements contain "#DELETED" after modifing the table which is correct since I clear the table everytime before I insert a new dataset. But the newly entered data isn't put into the controls anyway, instead of getting updated it remains on "#DELETED".

So, what I want is a method call that updates all the controls that are bounded to this table. Is there a method in vba that can be invoked and has the desired effect?

toom
04-18-2011, 11:54 AM
Okay, maybee I should give some more describtion.

I've table (let's call it clients) and first I delete the table completly and after that I insert a recordset into that table.

I open this particular clients table so that I can see how it changes. Then I click on a button that invokes the method that first deletes the table and then insert on value into the table.

The I can see that the entries in table clients change to "#Deleted" but when pressin F5 on that client table window the correct value is display.

My question: How can I invoke such an update or refresh on that table programmtically?

toom
04-18-2011, 12:28 PM
Okay, I found out.

A simple

Me.Requery

does exactly what I was looking for. Thanks for reading anyway.