I explained this further in another technical forum. I'll copy and paste my message from there to here:
________________________________________________________
At first glance you'd think this was a database issue, but it goes beyond that. I want a section of HTML to be skipped if a certain variable in a database is null. Basically I have an e-commerce store that sells clothing. The items are grouped into outfits, so OUTFITS contains a list of IDs for individual clothing items. Those IDS are labelled TopID, VestID, JacketID, etc., etc. I have a series of tables set up parallel to the photo that lists each item associated with that picture. If the JacketID is empty then nothing is called into the table where the Jacket info would be... HOWEVER, the table still exists on the page. This isn't a huge problem right now, but I'm eventually going to add order buttons with each item and I don't want there to be a bunch of blank tables with order buttons in them. If the VestID is NULL, I just want the HTML to skip ahead to the next section and not draw the table that would contain it. Look at this example page:
It shows a few items and a few empty tables. Like I said, I can live with it now, but once I implement order buttons this is going to look very unprofessional.
________________________________________________________
I've been told on that forum that a typical If Then Else statement will do the job. I just need to see a working example. I imagine it will look something like this: (I'm not a programmer, so I'm just writing out my theory here)
<%
If JacketID <> NULL
THEN{document.write("lots and lots of html code, including code for drawing the table, the Database Results Wizard code to get the data from the Access database, the order button and the corresponding javascript for the shopping cart controls"

}
ELSE{}
%>
If you look at my example page you'll see that I'll have to do this check seven or more times for the different possible items. So can anyone point me to a site that's doing this same thing?