从MS ACCESS 2010中的表中删除记录

时间:2017-07-07 07:24:42

标签: sql ms-access

我正在尝试从使用多个表数据创建的子报表中删除记录。 下面是我为此编写的代码

CurrentDb.Execute "DELETE FROM StateBudget " & " WHERE S_ID=" & ("SLELECT ID FROM States " & " WHERE State=" & Me.subformStateBudget.Form.Recordset.Fields("State"))

错误就像这样

  

查询表达式中的语法错误(缺少运算符)'S_ID = SELECT ID   FROM States WHERE State = ????'。

1 个答案:

答案 0 :(得分:0)

检查出来

 private class YourOnScrollListener extends RecyclerView.OnScrollListener {

    private boolean directionLeft;

    @Override
    public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
        if (newState == RecyclerView.SCROLL_STATE_IDLE) {
            if (directionLeft) drawButtons();
            //Draw buttons here if you want them to be drawn after scroll is finished
            //here you can play with states, to draw buttons or erase it whenever you want
        }
    }

    @Override
    public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
        super.onScrolled(recyclerView, dx, dy);
        if (dx < 0) directionLeft = true;
        else directionLeft = false;
    }

}

顺便说一句,你在select中拼错了,你错误地添加了这个字符串。 Select之前的Bracket应该在字符串内部等等。