指定的文件名不起作用

编程入门 行业动态 更新时间:2024-10-26 20:23:10
本文介绍了指定的文件名不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果之前有人问过,请事先道歉。 我在表单中创建了一个按钮及其功能 on click(我已进入宏构建器) -ExportWithFormating 对象类型 - 表格 对象名称 - (?? ?) 输出格式 - PDF格式(* .PDF) 现在发生了事情如果我将对象名留空,它会自动尝试保存表单转换为pdf格式,默认名称为FrmMachinefault.pdf ,这非常有效。 但是,如果我试图指定名称无论如何,即使是简单的文件也是如此。它出现了一个错误。 我要放入的代码是一个宏来从现有表格中提取信息 = [关闭日期]& " _" &安培; [受影响的区域]& " _" &安培; [资产]& " _" &安培; [标题]。 结果应该是例如。 02_07_15_101_Foundry_Mixer_Broken_Shaft.PDF 这就是我想要的,它目前做的是带有正确标题的安全页面,但是当我点击SAVE时它附带 " Microsoft Access无法找到对象''| 1''。 确保对象存在且你的名字拼写正确。 我已经查看了名字并且它应该是正确的请帮助

Hi apologies in advance if this has been asked before. I have created a button in a form and its function on click ( I have gone into the macro builder) -ExportWithFormating Object type - Form Object name - (???) Output format - PDF Format (*.PDF) now heres the thing If I leave the object name blank it automatically tries to save the form into a pdf format with a default name "FrmMachinefault.pdf and this works perfectly. However if I tried to specify the name in anyway even a simple "file" it comes up with an error. the code I want to put in is a macro to pull information from the existing form = [Closed date] & "_" & [Effected area] & "_" & [Asset] & "_" & [Title]. The result should be for example. 02_07_15_101_Foundry_Mixer_Broken_Shaft.PDF this is what I want and what it currently does is goes to the safe as page with the correct title but when I click SAVE it comes with "Microsoft Access cannot find the object ''ǀ1''. Make sure the object exists and that you spell its name correctly." I have gone through the names over and over again and it should be correct please help

推荐答案

是不是因为被引用的对象名称是应该导出的对象,而不是生成的文件的名称。您可以指定任何表单或表或查询的名称。 Jim Isn''t it because the object name that is being referred to is the object that should be exported, not the name of the resulting file. You could specify the name of any form or table or query. Jim

嗨吉姆,我认为你是对的,我把它改回了正确的对象名称,它一直有效。 然而,这并不能解决我的问题。我要求它从打开的信息中提取信息。对于文件名,所以当我点击导出按钮时,它会根据示例自动提取我想要的信息,我需要做的就是在进入该位置后按保存。 Hi Jim, I think you are correct, I have changed it back to the correct Object name and it consistently work. However, that doesn''t fix my problem. I require it to pull information from the "opened" for the filename so when I click the export button, it will automatically pull the information I want as per the example and all I need to do is press save after I go into the location.

您使用的是哪个版本的Office? ExportWithFormatting宏操作 您应该可以选择设置OutputFile Which version of Office are you using? ExportWithFormatting Macro Action You should have the option to set the OutputFile 展开 | 选择 | 换行 | 行号

更多推荐

指定的文件名不起作用

本文发布于:2023-10-27 02:47:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532077.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件名   不起作用

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!