在VB6上附加形状的麻烦

时间:2015-06-24 21:37:40

标签: vba vb6

我正在研究VB6,我尝试创建一个报告,为了创建这个报告,我使用了3个级别的形状。

"SHAPE APPEND " & _
    "  New adVarChar(15) As zoneId," & _
    "  New adVarChar(15) As zoneNam," & _
        "  ((SHAPE APPEND " & _
            "  New adVarChar(30) As ID, New adVarChar(30) As costumerName," & _
           "  ((SHAPE APPEND " & _
                "  New adVarChar(15) As productCode, New adVarChar(25) As produtName, New product(30) As product," & _
                "  New adVarChar(30) As price," & _
                "  New addouble As disount)" & _
                "  RELATE productCode to productCode) AS COST)" & _
            "  RELATE zoneId to zoneId) As FECHAS", _
    "Provider=MSDataShape;Data Provider=None"

此代码运行并且不显示错误但在执行时间内不显示数据且查询测试工作完美。我正在使用vb设计器生成报告,并使用数组上的DataField和DataMember名称绑定数据。

示例:

rsCostumersZone.addNew Array("ZONEID", "ZONENAME"), (rsDataZone!tbz_id, rsDataZone!tbz_name)

我感谢任何有关错误的提示。

1 个答案:

答案 0 :(得分:0)

在加载或设置数据源语句和“Report.show”语句之间放置一个消息框。我依稀记得这个问题。如果它有效,您可以将消息框更改为DoEvents或Wait。