如图:上面时主表【项目】,下面是关联表【项目.项目明细】。我向根据【项目主管】的用户来新增项目明细。
比如:当前用户是陈主管,则只能增加【项目编号】为01的明细,如果当前用户是李主管,则只能增加【项目编号】为02的明细。
此主题相关图片如下:snap1.jpg
新增按钮
if tables("主表").current("项目主管") = “陈主管” then
增加【项目编号】为01的明细
elseif tables("主表").current("项目主管") = “李主管” then
增加【项目编号】为02的明细
应该与当前用户名有关吧,如当前用户名是陈主管就可新增01项目明细
if user.name = “陈主管” then
增加【项目编号】为01的明细
elseif user.name = “李主管” then
增加【项目编号】为02的明细
if tables("主表").current("项目主管") = user.name then
增加【项目编号】为01的明细
这样行吗?