从多个表获取最大数字?
我在一个名为PrivateCustomerInfo,BusinessCustomerInfo和NHCustomerInfo的访问项目中有多个表格,每个表都有一个名为“ CustomerId”的列,并且我有一个单独的表单,用于使用增量客户ID添加新客户。为此,我使用了nz(dmax(“ [customerid iD]”,“ privateCustomerInfo
),每个表基本上从所有3个表中获取了最大的客户ID。但是,我不确定如何确定如何将这三个数字一起查找最大的数字,然后通过一个新的添加来进行一个,我可以在线阅读。是否有任何建议,对访问VBA不起作用吗?
I have multiple tables in an access project named PrivateCustomerInfo, BusinessCustomerInfo and NHCustomerInfo, each table has a column named "customerid" and I have a separate form that is used to add new customers into the designated table with a incremental customer ID. To do this I used Nz(DMax("[customerid]","PrivateCustomerInfo
and so on for each table to basically get the largest customer ID from all the 3 tables. However, I am unsure how to compare these 3 numbers together to find the largest one and then increment by one for the new addition. I read online that you could do Max(value1, value2, value3...)
but this doesnt work on Access VBA, any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经写了自己的功能,可以用不同数量的参数来调用,哪些可以返回其中最大的参数
I have have written my own function that can be called with a varying number of arguments and which returns the greatest of them