Hi All,
Just a quick thanks to all that respond to my queries, as this forum is fantastic.
I have a question, I have a database which does some searching through sql. I have linked this to show the results in a List Box with matching returns based on the query.
The problem I have found is when I get the initial results and either click on a blank area within the table or the headings it returns the Runtime error, it has to do with not being able to return a result as no record was clicked on.
I have tried entering an If statement before hand asking that if Me.lstCustInfo.value=Null then exit sub, however, it seems to just skip over it.
Any help would be much appreciated.
Cheers & Beers
Rat_b76
Just a quick thanks to all that respond to my queries, as this forum is fantastic.
I have a question, I have a database which does some searching through sql. I have linked this to show the results in a List Box with matching returns based on the query.
The problem I have found is when I get the initial results and either click on a blank area within the table or the headings it returns the Runtime error, it has to do with not being able to return a result as no record was clicked on.
Code:
DoCmd.OpenForm "Data", , , "[Record] = " & Me.lstCustInfo, , acDialog
I have tried entering an If statement before hand asking that if Me.lstCustInfo.value=Null then exit sub, however, it seems to just skip over it.
Any help would be much appreciated.
Cheers & Beers
Rat_b76