showdebola
New member
- Local time
- Today, 14:27
- Joined
- Nov 23, 2006
- Messages
- 2
Hi everyone,
i am quite a begginer at this so sorry for the simple question
I am running a access query from a vba code. IN the vba code I am writing the sql command.
I am getting the criteria for the sql code (WHERE command) from a number of combo boxes in a form.
The whole thing works quite well when I have something selected on all combo boxes but it does collapse when one of the combo boxes has the default value which is "" nothing.
for instance when I have
WHERE domicile.IdDomicile = 5
works fine. 5 comes from the combo box
when there is nothing selected in my combo box the sql code would be
WHERE domicile.IdDomicile =
and then I get an error msg saying the query is wrong.
Question,
what is the command in sql that instruct the query to return all records.
I tried using "*" when the combo box was not selected but then I dont get the records that are blank, only the ones with something writen in it.
Any other suggestion for this
Many Thanks
K Regards
i am quite a begginer at this so sorry for the simple question
I am running a access query from a vba code. IN the vba code I am writing the sql command.
I am getting the criteria for the sql code (WHERE command) from a number of combo boxes in a form.
The whole thing works quite well when I have something selected on all combo boxes but it does collapse when one of the combo boxes has the default value which is "" nothing.
for instance when I have
WHERE domicile.IdDomicile = 5
works fine. 5 comes from the combo box
when there is nothing selected in my combo box the sql code would be
WHERE domicile.IdDomicile =
and then I get an error msg saying the query is wrong.
Question,
what is the command in sql that instruct the query to return all records.
I tried using "*" when the combo box was not selected but then I dont get the records that are blank, only the ones with something writen in it.
Any other suggestion for this
Many Thanks
K Regards