View Full Version : opening a specific report record


viperstingray
06-30-2005, 08:29 AM
hi. I would like my users to have the option of selecting a client (cboClient) and then to select a job type (cboMeasureType) and then have a report open up with that information in it. How would I do that. I currenty have the following in a command button but it does not work.

DoCmd.OpenReport "rptECM one page", acViewPreview, , "[Client Name] = " & "'" & Me.cboClient & "'" & "[Measure Type] = " & "'" & Me.CboMeasureType & "'"

I know that the following code works because it is in my program:
DoCmd.OpenReport "rptECM one page", acViewPreview, , "[Client Name] = " & "'" & Me.cboClient & "'"

I am not using any queries...I know, I know. I just didn't need one (so far). Can anyone help???

Rich
06-30-2005, 11:59 AM
DoCmd.OpenReport "rptECM one page", acViewPreview, , "[Client Name] = " & "'" & Me.cboClient & "'" And "[Measure Type] = " & "'" & Me.CboMeasureType & "'"

viperstingray
06-30-2005, 12:00 PM
does anybody have any idea on how I can use 2 combo boxes to create a link to a report that will ONLY open the chosen (from the combo boxes) fields???

viperstingray
06-30-2005, 12:03 PM
thank you...i guess we both posted at the same time...I tried that but it gave me an error: TYPE MISMATCH ??? any idea why

Rich
06-30-2005, 12:04 PM
I could have sworn I just answered :confused:

Rich
06-30-2005, 12:05 PM
You're referring to the bound fields of the combo boxes, are they both numeric or text?

viperstingray
06-30-2005, 12:07 PM
they are combo boxes that contain text

Rich
06-30-2005, 12:09 PM
Just one column in each?

viperstingray
06-30-2005, 12:10 PM
yup, one each. They are also unbound

Rich
06-30-2005, 12:25 PM
DoCmd.OpenReport "rptECM one page", acViewPreview, , "[Client Name] = " & "'" & Me.cboClient & "'" & "And [Measure Type] = " & "'" & Me.CboMeasureType & "'"
?

viperstingray
06-30-2005, 12:28 PM
Is there anything you don't know how to fix??? you rock :)

Rich
06-30-2005, 12:34 PM
Is there anything you don't know how to fix???
Yes but the list is too long for here :D