Hi All,
I hope you can help...
I have been working on this for a while and my brain has all but melted... it seems simple, but i can't figure out how to make it work...
I have a form, which consists of 4 combo boxes and one button, which are:
Business Area/Meeting: (cboBusinessArea)
Owner: (cboOwner)
Date Raised: From: (cboFrom) To: (cboTo)
I have worked out the code to run each combo box seperately ie select "Financial Compliance" from the cboBusinessArea and click GO produces a report of all information in regards to "Financial Compliance".
But I am looking to be able to run a report based on all 3 areas or 2 if wanted. Below is the code i have to run each area individually:
1 - DoCmd.OpenReport "rptActionLog", acViewPreview, , "[DateRaised] Between #" & Me.cboFrom & "# & #" & Me.cboTo & "#" * "[BusinessArea/Meeting]='" & Me.cboBusinessArea & "'" * "[Owner]='" & Me.cboOwner & "'"
2 - 'DoCmd.OpenReport "rptActionLog", acViewPreview, , "[BusinessArea/Meeting]='" & Me.cboBusinessArea & "'"
3 - 'DoCmd.OpenReport "rptActionLog", acViewPreview, , "[Owner]='" & Me.cboOwner & "'"
I wrongly assumed it would be as simple as adding an "And" in between each cmd...
PLEASE HELP!!!
Thanks
Ryman
I hope you can help...
I have been working on this for a while and my brain has all but melted... it seems simple, but i can't figure out how to make it work...
I have a form, which consists of 4 combo boxes and one button, which are:
- cboBusinessArea
- cboOwner
- cboFrom
- cboTo
- cmdRunReport (Button)
Business Area/Meeting: (cboBusinessArea)
Owner: (cboOwner)
Date Raised: From: (cboFrom) To: (cboTo)
GO
But I am looking to be able to run a report based on all 3 areas or 2 if wanted. Below is the code i have to run each area individually:
1 - DoCmd.OpenReport "rptActionLog", acViewPreview, , "[DateRaised] Between #" & Me.cboFrom & "# & #" & Me.cboTo & "#" * "[BusinessArea/Meeting]='" & Me.cboBusinessArea & "'" * "[Owner]='" & Me.cboOwner & "'"
2 - 'DoCmd.OpenReport "rptActionLog", acViewPreview, , "[BusinessArea/Meeting]='" & Me.cboBusinessArea & "'"
3 - 'DoCmd.OpenReport "rptActionLog", acViewPreview, , "[Owner]='" & Me.cboOwner & "'"
I wrongly assumed it would be as simple as adding an "And" in between each cmd...
PLEASE HELP!!!
Thanks
Ryman