Macro cannot function after converting to accde

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?!
 
D

Daryl S

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top