Private Sub Report_Open(Cancel As Integer)
Dim aa As Variant
aa = Me.OpenArgs
Dim rs As New ADODB.Recordset
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
If IsLoaded("pub_frm产品编号生成器") Then
Set rs = cn.Execute("exec xs_pro_me产品编号生成表 '" & Forms!cl_frmlogin!username & "'")
Else
Set rs = cn.Execute(aa)
End If
Set Me.Recordset = rs
rs.Close
Set rs = Nothing
Set cn = Nothing
End Sub