Report from record 2007

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

Report from record 2007

Post by Egg 'n' Bacon »

I know I've doing something wrong, I just don't know what.

I've got a report that I'd like to open either with all the records showing, or for a specific record (by clicking a button by the relevant record on a form). But somehow it's not working.

I've attached a stripped down version of the DB in case anyone can point me in the right direction.

TIA
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78545
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Report from record 2007

Post by HansV »

RoleID is a number field, so you shouldn't enclose it in quotes Chr(34):

DoCmd.OpenReport ReportName:="RptRolesRqdCourses", View:=acViewPreview, WhereCondition:="TblRole_RoleID=" & Me.RoleID
Best wishes,
Hans

Egg 'n' Bacon
5StarLounger
Posts: 736
Joined: 18 Mar 2010, 11:05

Re: Report from record 2007

Post by Egg 'n' Bacon »

I could have sworn I tried that. Ho hum. That's where a second set of eyes can really help.

Thank you sir