设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 2651|回复: 7
打印 上一主题 下一主题

[模块/函数] Dlookup多条件调用 报错

[复制链接]
1#
发表于 2017-3-10 13:44:50 | 显示全部楼层
try
  1. Function GetStandardCost(lID As String) As Currency
  2.     GetStandardCost = DLookup("[标准成本]", "报价扩展", "[ID] =  '" & Forms!orders1!ID & "' And [customer] ='" & Forms!orders1!customer & "'")
  3. End Function
复制代码
2#
发表于 2017-3-10 13:49:05 | 显示全部楼层
  1. Function GetListPrice(lID As String) As Currency
  2.     GetListPrice = DLookup("[列出价格]", "报价扩展", "ID= '" & Forms!orders1!ID & "' And [customer] = '" & Forms!orders1!customer & "'")
  3. End Function
复制代码
3#
发表于 2017-3-10 15:55:12 | 显示全部楼层
ID引用错误
4#
发表于 2017-3-10 18:46:36 | 显示全部楼层
你好像是引用子窗体上的控件
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-16 05:45 , Processed in 0.100041 second(s), 27 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表