Private Sub Command1_Click ()
Adodc1. RecordSource="select * from the node temperature and humidity information table where date=#" & amp; DTPicker1. Value & amp; "#", "
Adodc1. Refresh
The Set DataGrid1. The DataSource=Adodc1
End Sub
Perform this control will pop-up missing operand errors, how to solve this?
CodePudding user response:
"Missing operand" the meaning of this is the lack of operands, means DTPicker1. This Value is null, the Value didn't know what's your DTPicker1 control controls, whether he has the Value attribute, this property Value is the Value of the date format?If there is the Value of this attribute, and DTPicker1. The Value of the Value is also the date format, estimates the Value is a string, you need to modify:
Adodc1. RecordSource="select * from the node temperature and humidity information table where date=#" & amp; CDate (DTPicker1 Value) & amp; "#", "
Amend the value to date type data,