I was able to fix it in the function by changing
GetFileNameBrowse = Trim(OpenFile.lpstrFile)
To
GetFileNameBrowse = left(OpenFile.lpstrFile, InStr(1, OpenFile.lpstrFile, vbNullChar) - 1)
I did a Len(txtFileName) and it is returning 257. It is not doing the Trim in the function properly and I can't see to trim it properly using any method.
Ideas?
Ok, I think i have isolated the problem but not sure how to resolve it. For the OnClick event for the command button which allows the user to browse, i am using this function which is from an O'Reilly access book. The code is doing something to the textbox, just not sure what because if I just...
Yup, thats the problem. Any ideas on how to get it to include that in the SQL statement? As you can see my INSERT statement has that but is not being added. I believe it has to do with the slashes in the path... \ is an escape character is it not?
Debug Output of strSQL:
INSERT INTO tblSiteFileAttachments(siteID, faFileDescription, faFileName) VALUES (1006, '4-13 Error Log', 'C:\Error.log
and the Error is:
Error Number: 3075
Error Description: Syntax error in string in query expression ''C:\Error.log'.
I have a form where users can add file links to supporting documentation. I am storing the SiteID, along with the file description and file path of the file they browse to.
The problem is the path contains \ in the UNC path and I am getting an error on the INSERT statement. Can someone please...
I am trying to wrap my head around an idea we are throwing around at work. Our team is responsible for the project management of multiple types of IT projects. Historically, we have restarted each project with the same list of our sites and contacts (which remain relatively constant for all...
I am working on a project in which we receive and track Bill of Materials for a network project we are doing. The bill of material is layed out as so:
Header
Bill of Material number
Bill of Material date
site id where it will be installed
engineer responsbile for installation
Details
product...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.