Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'This expression is typed incorrectly or is too complex' 1

Status
Not open for further replies.

beredon

Programmer
Jan 5, 2001
17
AU
I get an error when I try to run this query in Access. It doesn't look too complex to me :p

PARAMETERS storyid Short;
SELECT story.story_id, story.story_date, story.story_text, member.member_name_first, member.member_name_last
FROM member INNER JOIN story ON member.member_id = story.story_author
WHERE story.story_id = "storyid"

I can't seem to see where the problem is. story_id is the primary key in the story table and member.member_id is the primary key in the member table.
 

I think the error is in the Parameter statement. What is the meaning of Short? That field should be a data type and I don't know of a data type named "SHORT."

Another problem may be in the Where criteria. Is the column story.story_id numeric or text? If numeric, don't enclose the criteria in quotes.

WHERE story.story_id = 999 Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Thanks a lot, it was the quotes causing the problem!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top