This content has been marked as final. Show 7 replies
> I am having some trouble and need help! There is a search text box from
> homepage where someone can search by typing a name and they would get the
> results from 2 different tables NAMES and LETTERS that have relationship
> NID and NID. Need to show Name, Letters, and Date.
Sounds like you need to join the 2 tables, eg
SELECT Name, Letters, [Date]
FROM Names N INNER JOIN Letters L
ON N.nid = L.nid
WHERE Name LIKE %Whatever%
I've also enclosed date in [ ] - using a column called date in a query
without  will usually cause an error
Does that get you any further forward?
You only need one recordset. Use a join clause to join the tables to each other.
Thanks guys, Unfortunately I can't get to my computer till later today and I am eager to put that code in and try it and let you know can you please check back here tomorrow again.
I do have questions though,
for the date I would like to only show dates that are newer than the current date
where would I put this date expression?
Also from your post Jon
>FROM Names N INNER JOIN Letters L
>ON N.nid = L.nid
are the N and L alias? If yes, what do they help with?
Bregent mentioned I only need 1 recordset, which one do I keep? the rsNames? When I drag and drop the links from the application window into DW design view won't I need both recordsets so I can drag the fields from each table or am I doing that wrong?
As you can see I am struggling, and I ask many questions (bad habit I guess)
okay but now 4 records show up for John, but all 4 are showing the same letter and same date which is actually the first record in my db. So the first part of the db works fine but now the letters table is always showing the 1st record in the db.
Without seeing your database schema and sample data, we are going to have a hard time with this. Please post more information regarding your database tables.