Home > Software engineering >  Code to run is always a problem, please help to have a look at it!
Code to run is always a problem, please help to have a look at it!

Time:09-30

Private Sub Command1_Click ()

If Option1. Value=https://bbs.csdn.net/topics/True Then
Adodc1. RecordSource="select * from shouruxinxi where class='" & amp; Text1. Text & amp; "'
"End the If
Adodc1. Refresh run time, always say there is error"
If Option2. Value=https://bbs.csdn.net/topics/True Then
Adodc1. RecordSource="select * from shouruxinxi where income time='" & amp; Format (Text2. Text, "yyyy - mm - dd) & amp; "'
"Adodc1. Refresh run time, always say there is error"
The Else
N=MsgBox (" input date format is not correct, please input again!" VbOKOnly, "")
Text2. Text=""

Adodc1. RecordSource="select * from shouruxinxi where income time='" & amp; Format (Text2. Text, "yyyy - mm - dd) & amp; "'
"End the If
Adodc1. Refresh " run, he always said there is error "
End Sub

CodePudding user response:

What is wrong?

CodePudding user response:

You have a problem the code logic...

CodePudding user response:

I this is a query interface, there are two options: 1, query, according to the class 2, according to the time income query, always say grammar wrong at runtime
  • Related