I am a complete ASP novice and I’m trying to create a dynamic job/project status page on my website.
I have a dynamic page on my website driven by an Access database (data.mdb). This page shows the details of a record from the database table (projectsTbl). The fields in the table include one for the job number (smcNumber).
In the database there is second table called diaryTbl. This table contains several fields including one for the job number (smcNumber). The job number field is common between both tables.
In our database the first table (projectsTbl) contains the details of each project along with a unique job number (smcNumber). The second table (diaryTbl) contains the diary/events for each project and uses the same unique job number to sort out which diary entries belong to which project. As the diary entries are in a separate table it doesn’t matter whether one project has just a couple of diary entries or fifty.
When the page is called it displays that projects data based on the job number from the projectsTbl table and all the diary entries with the same job number (smcNumber) from the diaryTbl table.
I know how to ‘hard code’ a query to only display certain records depending on a ‘hard written’ selection but I don’t know how to make the query choose records from a variable query (i.e. the job number which will be different depending on which job is being looked at).
Someone suggested creating a variable from the job number (from the first table) and putting that variable into the query but I don’t know how to do that.
Can anyone help? 
|