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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with .adp report recordsource

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
0
0
US
I am trying to read a few columns from a SQL table into a MSAccess Project report. I only need a simple recordsource select statement for the report's recordsource, but I need a where criteria that is an integer on a form in the project that is always open. However, I cannot get the syntax right for the where clause in my SQL recordsource select statement. I am trying:

SELECT comments_id, participant_id, comment_type_cd, comments, created_by_userid, created_ts
FROM dbo.XX_COMMENTS
WHERE participant_id = Forms ! frmXXX_YYY_MainData ! [txtParticipantID]
ORDER BY comments_id DESC

but I keep getting the error that the ! character is not valid. Anyone know what the syntax would be for my where clause to reference a field on my form as a criteria? Thanks for any help you cn offer.
 
Try Forms!frmXXX_YYY_MainData.[txtParticipantID]

Beir bua agus beannacht!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top