Macro cannot function after converting to accde

  • Thread starter Thread starter aw
  • Start date Start date
A

aw

The Following line (stored under the form) works fine on accdb for but got
no response after I convert it into accde.

Public Sub Cmd_CHN_Click()
DoCmd.OpenReport "Contract 3D v002", acViewReport, "", "([Qry SC with
Region].[Completed] Like [Forms]![Contract by Destination v002]![ShipSelect])
And ([Country Code_1].[Name]=""China"")", acNormal
End Sub

How to solve this?!
 
aw -

You need the form field evaluated outside of the double-quotes:

Public Sub Cmd_CHN_Click()
DoCmd.OpenReport "Contract 3D v002", acViewReport, "", "([Qry SC with
Region].[Completed] Like " & [Forms]![Contract by Destination
v002]![ShipSelect] & ")
And ([Country Code_1].[Name]=""China"")", acNormal
End Sub
 
Back
Top