Private Sub Command43_Click() On Error GoTo Err_Command43_Click Dim stDocName As String stDocName = ChrW(22995) & ChrW(21517) DoCmd.OpenReport stDocName, acPreview Exit_Command43_Click: Exit Sub Err_Command43_Click: MsgBox Err.Description Resume Exit_Command43_Click End Sub Private Sub cmdview_Click() [Forms]![简单查询]![Cbono] = 会员编号 On Error GoTo Err_cmdview_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = ChrW(20250) & ChrW(21592) & ChrW(-29722) & ChrW(32454) & ChrW(20449) & ChrW(24687) & ChrW(26597) & ChrW(-29726) DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdview_Click: Exit Sub Err_cmdview_Click: MsgBox Err.Description Resume Exit_cmdview_Click End Sub 看不明白啊,你写的是我这段代码的解释么?
最新回答
作业***喊你回家生火啦
2024-11-03 12:16:42
Private Sub Command43_Click() On Error GoTo Err_Command43_Click '如果出错,就跳到标签名为“Err_Command43_Click”的一行。 Dim stDocName As String '定义一个字符串型变量 stDocName = ChrW(22995) & ChrW(21517) '把这个变量赋值为“姓名” DoCmd.OpenReport stDocName, acPreview '打开“姓名”的记录 Exit_Command43_Click: '标签 Exit Sub '结束子过程 Err_Command43_Click: '标签 MsgBox Err.Description' 提示出错对话框 Resume Exit_Command43_Click '跳过这一句 End Sub '结束子过程 Private Sub cmdview_Click() ' [Forms]![简单查询]![Cbono] = 会员编号 '定义查询条件 On Error GoTo Err_cmdview_Click '如果出错,就跳到Err_cmdview_Click 行 Dim stDocName As String '定义字符串型变量 Dim stLinkCriteria As String '定义字符串型变量 stDocName = ChrW(20250) & ChrW(21592) & ChrW(-29722) & ChrW(32454) & ChrW(20449) & ChrW(24687) & ChrW(26597) & ChrW(-29726) '把stDocName赋值为“会员详细信息查询” DoCmd.OpenForm stDocName, , , stLinkCriteria '打开相应记录 Exit_cmdview_Click: '标签 Exit Sub '退出子过程 Err_cmdview_Click: '标签 MsgBox Err.Description '提示出错对话框 Resume Exit_cmdview_Click '跳过这一句 End Sub'结束子过程