Can someone give me the syntax for updating a DB with a form containing bound controls? I want all fields updated.
Printable View
Can someone give me the syntax for updating a DB with a form containing bound controls? I want all fields updated.
I think if they are bound, you will be referencing some sort of recordset. In which case you just do a .Update
Mega.
I tried, I get "insufficient key column information for updating or refreshing"
Check your tables to make sure you have a primary key or a unique key set before doing the update.Quote:
Originally posted by DUNSEL
I tried, I get "insufficient key column information for updating or refreshing"
Mega.
Yeah there's a primary key. I even wiped the form clean and dropped the query again to be sure they were bound. I know the lock type and all other security is correct because I checked that already. Even tried dimming the rs, even though I shouldn't have to with data environment. I don't get it.
Hmm, I would have to have a closer look. I don't use the Data environment as I do all my DB work with unbound controls.
If I get time, I will dabble. Hopefully someone will come up with a answer for you though.
Mega.
It does work, and I'm a moron. The grid needs to be refreshed for the update to show. How can I code that in an event, other than unloading and showing again?
Does it not have a .Refresh prperty?Quote:
Originally posted by DUNSEL
It does work, and I'm a moron. The grid needs to be refreshed for the update to show. How can I code that in an event, other than unloading and showing again?
Mega.
Your sig kills me. Yeah, it does, but either I'm not coding it properly, or refresh won't do it. I'm refreshing in a click event of another form, so I tried frmName.Refresh, to no avail, and then frmName.MSHFlexGrid1.Refresh, with the same results. I'm about to try unload and show, because I'm pretty sure that will work.