ms access - Saving data from a form to table -
this baffling me.
i have userform listbox showing in table (connected using rowsource)
on form have combo boxes , text boxes, when user updates them want data overwrite whats in table.
when click account in list box text/combo boxes populate data, when change come data not save , don't know why.
on text/combo boxes have following code save in table:
runcommand accmdsaverecord docmd.domenuitem acformbar, acrecordsmenu, acsaverecord, , acmenuver70 me.refresh me.dirty = false
any idea why wont save?
this alternative code 1 have
dim db database dim rec recordset set db = currentdb set rec = db.openrecordset("select * <<insert table name>> <<textbox>>= primary key") rec.edit rec("<<table field name>>") = me.<<form textbox etc>> rec("<<table field name>>") = me.<<form textbox etc>> rec.addnew
Comments
Post a Comment