【发布时间】:2020-07-13 18:30:26
【问题描述】:
请你帮帮我。我在 Access 中有一个数据库和一个用 Delphi 编写的程序(我使用了库 Ehlib),我正在尝试在 VBA 中重写它。
with CustomDriver do
try
with SelectCommand do
begin
CommandText.Text := 'select count(*) from OBJ_APP a' + ^M +
'where ID_App = :AID_App and exists (select 1 from obj_app b where b.ID_Obj = a.ID_Obj and b.ID_App = :AID_App_Replace)';
Parameters.ParamByName('AID_App').Value := AID_App;
Parameters.ParamByName('AID_App_Replace').Value := AID_App_Replace;
end;
vFree := True;
ExecuteCommand(SelectCommand, DsReplace, vFree);
if (DsReplace <> Nil)
and(DsReplace.RecordCount > 0)
and(DsReplace.Fields[0].AsInteger > 0) then
如何在 VBA 中编写最后三行代码?有没有比& Chr (34) & 更简单的写双引号的方法?
【问题讨论】: