Domain functions become most useful when you use a variable for the value in the Criteria Expression. That's not the most useful application of domain functions. So far, I've just used hard-coded values in the Criteria Expression. Returns the total cost of Epson printers from the Products table.īecause the entire Criteria Expression must be string delimited, the expression evaluator will get confused when using the quote to delimit a sting value, so you have to use two quote marks ("") in place of one ("). DSum("Cost", tblProduct", " = 'printer' AND = 'Epson'"orĭSum("Cost", tblProduct", " = ""printer"" AND = ""Epson""".Returns the average cost of all printers from the Products table. DAvg("Cost", "tblProduct", " = 'printer'").DMax("OrderDate", "tblOrders", " DLookup("SSN", "tblEmployee", " = 16")Returns the social security number of employee number 16.DCount("EmpID", "tblEmployee")Counts the number of records in the Employee table.
0 Comments
Leave a Reply. |