2017-02-14 77 views
-2

我有一個問題,我不能修復Dmax代碼,請幫我糾正。Dmax與多個標準

Max_Rev = _ 
DMax("[Rev#]", _ 
"SCR_Run", _ 
"[JobNumber]=" & Me.JobNumber & "AND [Department]=" & Me.Department) 

謝謝。 Muralidaran。

回答

1

您需要根據您的工作號碼,「與」

Max_Rev = _ 
DMax("[Rev#]", "SCR_Run", _ 
"[JobNumber]=" & Me.JobNumber & " AND [Department]=" & Me.Department) 

此外,如果這些字段是文本,你需要引號之間的空間。

E.g.

Max_Rev = _ 
DMax("[Rev#]", "SCR_Run", _ 
"[JobNumber]='" & Me.JobNumber & "' AND [Department]='" & Me.Department & "'") 

或組合...

Max_Rev = _ 
DMax("[Rev#]", "SCR_Run", _ 
"[JobNumber]=" & Me.JobNumber & " AND [Department]='" & Me.Department & "'") 
+0

提供的解決方案行之有效。非常感謝。 – Muralidaran