Hi, I just completed an application that queried the database to see if a value existed in there, if it didn't then it did one thing, if it did it did another. at first I was using
and was getting Object required errors, I spent ages trying to figure out why and Google was of little use telling me I'd probably typoed, so I asked another developer and he said to do
- If rsblah is nothing then
and it worked, he explained that sometimes rather than a query returning an empty recordset it didn't return one at all but he didn't know why so I thought I'd ask here if someone could explain that to me? I fully expected my recordset to return empty as there's no data in the table yet and the query was solid. It's not an urgent thing as the application is working now but I'm the kind of person that likes to know why something happens rather than just know it happens but have no idea why.
PS. I know one of the if statements checks for a value and the other checks for no value so my THEN statements were switched so the right thing happens so no need to worry about that