I have an SQL select statement that I cannot quite get working.
Dim SelectStr As String = "SELECT * FROM Appointments WHERE Doctor = '" & ComboBox1.Text & "' AND AptDate = #" & DateTimePicker1.Text & "#"
This works perfect ... however I have 2 more WHERE possibilities ... I would like to include all of the above Appointments where PatientName <> "" OR AddName <> "". Basically I want to retrieve patients in the main appointment slot and in the additional appointment slot (just not the rest of the empty timeslots).
The following line of code I tried that did not work only supplied me with those appointments where PatientName <> "" and totally ignored the AddName <> ""
Dim schedphoneSelectStr As String = "SELECT * FROM Appointments WHERE Doctor = '" & ComboBox1.Text & "' AND AptDate = #" & DateTimePicker1.Text & "# AND PatientName <> "" OR AddName <> "" "
Any help would be appreciated.