access vba - Modifying records sourced in a joined query -
i cannot update records on form it's record source in simple sql select query (containing 2 joined tables linked combo box value). have ensured properties of each field , form set editing unfortunately when go fields, although lets me enter, cannot make changes. possible case because records sourced query ?
below routine queries data , maps record source form triggered 'after update' event on combo box used filter records. data table trying update 'tblvaluechain02
' , extracted string sql_get2
, fed form frmstaticdatadepartments06
.
private sub cboteams_afterupdate() dim sql_get string dim sql_get2 string sql_get = "select * tblvaluechain01 tblvaluechain01.macroprocess = '" & cboteams & "'" sql_get2 = "select tblvaluechain01.macroprocess, tblvaluechain02.autonumbering, tblvaluechain02.microprocesso02, tblvaluechain02.notes, tblvaluechain02.remarks tblvaluechain02 inner join tblvaluechain01 on tblvaluechain02.idmacroprocesso01 = tblvaluechain01.idmacroprocesso (tblvaluechain01.macroprocess = '" & [cboteams] & "')" frmstaticdatadepartments04.visible = true frmstaticdatadepartments04.requery frmstaticdatadepartments05.visible = true frmstaticdatadepartments06.visible = true lblproduct.visible = true lbldepartment.visible = true lblteam.visible = true me.frmstaticdatadepartments05.form.recordsource = sql_get me.frmstaticdatadepartments06.form.recordsource = sql_get2 me.frmstaticdatadepartments06.requery end sub
the problem lies in second query, using called cross join, , these not updateable. need redesign query using standard inner join
, if possible.
if post more info, screenshots of app , sample data of 2 tables, see next.
Comments
Post a Comment