Hi there
I realise that this is somewhat trivial and maybe I can't see the wood for the trees but this is making me crazy.
I have a recordset statement:
SELECT mainMenu.mainMenuID, mainMenu.mainMenuLabel, subMenu.subMenuID, subMenu.subMenuLabel, pageContent.contentID, pageContent.contentTitle
FROM mainMenu RIGHT JOIN (subMenu RIGHT JOIN pageContent ON subMenu.subMenuID = pageContent.subMenuID) ON mainMenu.mainMenuID = pageContent.mainMenuID
WHERE mainMenu.mainMenuID = 3
This returns all the relevant records. The subMenuID's returned are "6", "7" and "NULL". Again, this is correct.
However, the code <% IF (rsDonations.Fields.Item("subMenuID").Value) = 6 THEN %> returns the correct subMenuLabel but <% IF (rsDonations.Fields.Item("subMenuID").Value) = 7 THEN %> and <% IF ISNULL(rsDonations.Fields.Item("subMenuID").Value) THEN %> do not work.
I've tried sorting, grouping, double and single quotation marks around the numbers, trying "NOT ISNULL AND... " statements, changing the order of the IF... THEN... ELSE... statement and doing just single IF... THEN... statements but only the value with "6" seems to work.
Any ideas?
Thanks in advance.