Private Sub Command0_Click()
Dim strT As String
Dim vItem As Variant
For Each vItem In Me.List1.ItemsSelected
strT = strT & vItem & ","
Next
DoCmd.OpenReport "人员打印表", acViewPreview, , "id in (" & strT & "0)"
我尝试把下面那段代码
For Each vItem In Me.List1.ItemsSelected
改成引用"人员打印"表,但一直没有成功.不知道如何写.自己都觉得自己太菜了.
因为我实际是从其他地方把大量数据拷贝到表里面再打印,一个个点太费时.而且容易错.就是把窗体的行来源改成"人员打印"表,也还是要点.
还有一点我不明白:循环是For Each .... Next 但DoCmd是在外面,为什么会打好几页呢?