好的,这是交易。我有一个以前存在的 SQL Server 2008 数据库,它通过链接表/视图链接到 Access 2002 数据库。到目前为止,项目代码一直是一个nvarchar
类型。
我有一个将项目代码转换为的 SQL 查询Int
和一个使用该MAX()
函数为我提供最高值的 Access 2002 链接查询。每次选择“新建”记录按钮时,我希望从这个最高值开始将项目代码增加 1。
Right now, when "New" is selected, the form is blank, waiting for input. What I want to do is, when "New" is selected, to have the value of the MAX()
function query passed to a variable, have 1 added to it, and the resulting value placed in the "Item Code" text box.
这听起来很容易,但由于某种原因,我似乎无法让它工作。我非常了解 Access,但我的 VBA 相当薄弱。