Scamquist
asked on
Open Access 2010 drill through with multiple criteria
I am trying to build a drill through sales form.
When I click on a cell, I want to open another form (frmSingleMonthSales) filtered by a month number (L1, L2M L3...) and customer number.
If I use the line below, the form opens with all sales from Mth L1
DoCmd.OpenForm FormName:="frmSingleMonthS ales", WhereCondition:="Mth= 'L1'"
If I use the line below, the form opens with all orders for the proper customer
DoCmd.OpenForm FormName:="frmSingleMonthS ales", WhereCondition:="ID_CUST_S OLDTO = '" & Me.txtIdCust & "'"
When I combine the lines as below, I get a Run-Time error 13 Type mismatch
DoCmd.OpenForm FormName:="frmSingleMonthS ales", WhereCondition:="Mth= 'L1'" And "ID_CUST_SOLDTO = '" & Me.txtIdCust & "'"
If the each of the first two lines work, why won't the combined line work.
Any help will be appreciated
When I click on a cell, I want to open another form (frmSingleMonthSales) filtered by a month number (L1, L2M L3...) and customer number.
If I use the line below, the form opens with all sales from Mth L1
DoCmd.OpenForm FormName:="frmSingleMonthS
If I use the line below, the form opens with all orders for the proper customer
DoCmd.OpenForm FormName:="frmSingleMonthS
When I combine the lines as below, I get a Run-Time error 13 Type mismatch
DoCmd.OpenForm FormName:="frmSingleMonthS
If the each of the first two lines work, why won't the combined line work.
Any help will be appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the assist.
Open in new window