北京 | 上海 | 天津 | 重庆 | 广州 | 深圳 | 珠海 | 汕头 | 佛山 | 中山 | 东莞 | 南京 | 苏州 | 无锡 | 常州 | 南通 | 扬州 | 徐州 | 杭州 | 温州 | 宁波 | 台州 | 福州 | 厦门 | 泉州 | 龙岩 | 合肥 | 芜湖 | 成都 | 遂宁 | 长沙 | 株洲 | 湘潭 | 武汉 | 南昌 | 济南 | 青岛 | 烟台 | 潍坊 | 淄博 | 济宁 | 太原 | 郑州 | 石家庄 | 保定 | 唐山 | 西安 | 大连 | 沈阳 | 长春 | 昆明 | 兰州 | 哈尔滨 | 佳木斯 | 南宁 | 桂林 | 海口 | 贵阳 | 西宁 | 乌鲁木齐 | 包头 |
建立了四个表,分别是,报价,报价明细,订单,订单明细和一个查询,报价扩展。希望,通过Dlookup两重条件(ID=报价明细上面的ID,customer=报价上面的customer)以实现快制作订单的目的。 可是 不能自动跳 代码如下 Private Sub ID_AfterUpdate() '每次产品更改的初始价格和折扣 If Not IsNull(Me![ID]) Then Me![列出价格] = GetListPrice(Me![ID]) Me![标准成本] = GetStandardCost(Me![ID]) '空产品订单表示用户要删除项目 Else eh.TryToRunCommand acCmdDeleteRecord End If End Sub Function GetStandardCost(lID As String) As Currency GetStandardCost = DLookup("[标准成本]", "报价扩展", "[ID] = '" & Forms!orders1!ID "'" And "[customer] ='" & Forms!orders1!customer"'") End Function Function GetListPrice(lID As String) As Currency GetListPrice = DLookup("[列出价格]", "报价扩展", "ID= '" & Forms!orders1!ID "'" And "[customer] = '" & Forms!orders1!customer"'") End Function |