为什么PDF文件打开时不会保持最佳状态 [英] Why when PDF file opens it won't stay on top
问题描述
我在表单上有一个超链接字段,单击该字段时会打开文本字段中的PDF文件。
PDF文件打开以供显示很好,但不会保持在最佳状态。 Access表单保持最佳状态。 是否可以解决此问题,以便PDF保持可见而不在Access表单后面?
以下是onclick代码:
I have a hyperlink field on a form that when clicked opens the PDF file that is in the text field.
The PDF file opens for display just fine but doesn't stay on top. The Access form stays on top. Can this be resolved so the PDF stays visible and not behind the Access form?
Here is the onclick code:
Private Sub txtFileName_Click()
On Error GoTo Err_txtFileName_Click
Application.FollowHyperlink Me.txtFileName
Exit_txtFileName_Click:
$
退出Sub¥
Err_txtFileName_Click:
$
MsgBox"错误号码:" &安培; Err.Number& vbCrLf& "错误描述:" &安培; Err.Description& vbCrLf& "错误来源:" &安培; Err.Source
恢复Exit_txtFileName_Click
结束次
Private Sub txtFileName_Click()
On Error GoTo Err_txtFileName_Click
Application.FollowHyperlink Me.txtFileName
Exit_txtFileName_Click:
Exit Sub
Err_txtFileName_Click:
MsgBox "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & vbCrLf & "Error Source: " & Err.Source
Resume Exit_txtFileName_Click
End Sub
Steve C. Leigh
Steve C. Leigh
推荐答案
嗨Steve,
Hi Steve,
I在Windows 10和Access 2013下对您的描述进行了测试,但我无法重现您的问题。单击文本字段后,pdf文件在顶部打开。您是否使用类似SetWindowPos的东西将表单设置在顶部?您可以参考以下链接获取
以获取更多相关信息。
I made a test with your description under windows 10 and Access 2013, but I failed to reproduce your issue. After I click the text field, the pdf file was opened on top. Did you use something like SetWindowPos to set the form on the top? You could refer
the link below for more information about this.
#ACC:如何在其他Windows之上浮动MS Access Windows
https://support.microsoft.com/en-us/kb/101325
# ACC: How to Float MS Access Windows On Top of Other Windows
https://support.microsoft.com/en-us/kb/101325
如果您没有,我建议您创建一个带有文本字段的新表单,以检查是否可以复制。如果可以,如果您可以分享我们重现您的问题的步骤,将会很有帮助。
If you did not, I suggest you create a new form with text field to check whether it could be reproduced. If you could, it would be helpful if you could share us steps to reproduce your issue.
最好的问候,
Best Regards,
Edward
这篇关于为什么PDF文件打开时不会保持最佳状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!