这是我的查询完美运行
"SELECT RemBal FROM Sales WHERE CustomerName='" & CustomerName.Text & "'"
现在我正在尝试以两个基础客户名称和&当前日期
"SELECT RemBal FROM Sales WHERE CustomerName='" & CustomerName.Text & "' AND SaleDate=#" & SaleDate.Value & "#"
现在这个查询没有给我任何错误,但也没有返回任何值 请帮忙
答案 0 :(得分:1)
试试这个
SaleDate.Format = DateTimePickerFormat.Custom
SaleDate.CustomFormat = "yyyy-mm-dd"
"SELECT RemBal FROM Sales WHERE CustomerName='" & CustomerName.Text & "' AND SaleDate=#" & SaleDate.Text() &"# "
答案 1 :(得分:0)
SELECT rembal
FROM sales
WHERE customername = '" & CustomerName.Text & "'
AND Format(saledate, 'dd/MM/yyyy') = '" & SaleDate.Value & "'