 | | 
February 13th, 2008, 04:46 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| | Need "Browse for File" button
I need some help. I need a button on an Access form that allows the user to browse for a file on our network, and insert it in a field (rather than having to type a path). I dont need any filters because the files can be any number of formats.
I've come across a couple of so-called "simple" solutions, but for the life of me, I either cant understand them or I cant get them to work. I know nothing about VB so if someone can provide a truly simple answer (preferably something I could cut and paste) with clear instructions on how to actually get it to work, I'd be VERY grateful.
Oh, I am coding this in Access 2000, but if I need to, I can code it in Access 2002-2003.
Thanks!
Barb
| 
February 13th, 2008, 05:25 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover I need some help. I need a button on an Access form that allows the user to browse for a file on our network, and insert it in a field (rather than having to type a path). I dont need any filters because the files can be any number of formats.
I've come across a couple of so-called "simple" solutions, but for the life of me, I either cant understand them or I cant get them to work. I know nothing about VB so if someone can provide a truly simple answer (preferably something I could cut and paste) with clear instructions on how to actually get it to work, I'd be VERY grateful.
Oh, I am coding this in Access 2000, but if I need to, I can code it in Access 2002-2003.
Thanks!
Barb | - Set a Reference to Microsoft Office XX.X Object Library.
- Copy and Paste the following code wherever appropriate, changing the name of the Text Box
-
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strSelectedFile = vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fd = Nothing
- Let me know if you have any problems.
| 
February 13th, 2008, 05:54 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| | Quote: |
Set a Reference to Microsoft Office XX.X Object Library.
| How do I do that? Quote: |
Copy and Paste the following code wherever appropriate,
| I'm afraid I couldnt begin to know where it's appropriate. Can you be more specific? Quote: |
changing the name of the Text Box
| Do you mean I have to change the name of the actual Text Box (what do I change it to?) or do you mean I have to rename the Text Box reference in the below code?
Sorry, I warned you I knew nothing about this
Thanks!
Barb Quote: |
Originally Posted by ADezii - Set a Reference to Microsoft Office XX.X Object Library.
- Copy and Paste the following code wherever appropriate, changing the name of the Text Box
-
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strSelectedFile = vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fd = Nothing
- Let me know if you have any problems.
| | 
February 13th, 2008, 06:59 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover How do I do that?
I'm afraid I couldnt begin to know where it's appropriate. Can you be more specific?
Do you mean I have to change the name of the actual Text Box (what do I change it to?) or do you mean I have to rename the Text Box reference in the below code?
Sorry, I warned you I knew nothing about this
Thanks!
Barb | - To set a Reference to the Microsoft Office Object Library
- In Form Design View
- Select View from the Menu Bar ==> Code
- Select Tools from the Menu Bar ==> References
- Scroll down to the Microsoft Office XX.X Object Library
- Select the Check Box next to this Option
- Click on OK
- Select the Text Box on your Form (Design View) that will show the Path to the selected File
- Right Click on Text Box ==> Properties ==> All Tab ==> Name.
- Rename the Text Box to txtSelectedFile
- Close Properties Dialog Box
| 
February 13th, 2008, 07:49 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
Ok, I got that. Now where does the code go? And is there anything I have to do to connect the code to the text box? Quote: |
Originally Posted by ADezii - To set a Reference to the Microsoft Office Object Library
- In Form Design View
- Select View from the Menu Bar ==> Code
- Select Tools from the Menu Bar ==> References
- Scroll down to the Microsoft Office XX.X Object Library
- Select the Check Box next to this Option
- Click on OK
- Select the Text Box on your Form (Design View) that will show the Path to the selected File
- Right Click on Text Box ==> Properties ==> All Tab ==> Name.
- Rename the Text Box to txtSelectedFile
- Close Properties Dialog Box
| | 
February 14th, 2008, 12:02 AM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Ok, I got that. Now where does the code go? And is there anything I have to do to connect the code to the text box? | Quote: |
Now where does the code go?
| The most obvious location would be the Click() Event of a Command Button. Quote: |
And is there anything I have to do to connect the code to the text box?
| Line #13 connects the code (selected File) to the Text Box as long as it is named txtSelectedFile.
| 
February 14th, 2008, 07:34 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
Thanks, that worked great!
One question, though, is that even though I have it set up as a hyperlink, when it's clicked on, nothing happens. Is there some extra coding it needs?
Also, is there any way of also getting an image of the file selected to display?
Thanks so much!
Barb Quote: |
Originally Posted by ADezii The most obvious location would be the Click() Event of a Command Button.
Line #13 connects the code (selected File) to the Text Box as long as it is named txtSelectedFile. | | 
February 14th, 2008, 09:37 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Thanks, that worked great!
One question, though, is that even though I have it set up as a hyperlink, when it's clicked on, nothing happens. Is there some extra coding it needs?
Also, is there any way of also getting an image of the file selected to display?
Thanks so much!
Barb | You definately should have mentioned these 'little details' up front! Is the Control Source for txtSelectedFile a Hyperlink Data Type?
| 
February 14th, 2008, 10:13 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| | Quote: |
Originally Posted by ADezii You definately should have mentioned these 'little details' up front! Is the Control Source for txtSelectedFile a Hyperlink Data Type? | Sorry. I didint mention it because it was working with the "edit hyperlink" code I tried first.
Anyway, yes, I currently have the control source as a Hyperlink. I also had some trouble initially getting the hyperlink to not use http:// to target the link. I may have done it wrong (i set the format to "file://") so if that's wrong, please tell me the correct method.
Thanks for all your patience!!
| 
February 15th, 2008, 01:28 AM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Sorry. I didint mention it because it was working with the "edit hyperlink" code I tried first.
Anyway, yes, I currently have the control source as a Hyperlink. I also had some trouble initially getting the hyperlink to not use http:// to target the link. I may have done it wrong (i set the format to "file://") so if that's wrong, please tell me the correct method.
Thanks for all your patience!! | You are quite welcome. Now, let's work on the Hyperlink part first. Make a slight change to the code in Line #11, as listed below. Select a Local File first, see if you can Navigate to it via the Hyperlink on the Form Field (txtSelectedFile), then a File on the Network. Let me know how you make out: -
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strSelectedFile = vrtSelectedItem & "#" & vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fd = Nothing
| 
February 15th, 2008, 05:50 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
That worked perfectly, thanks!!
What about getting an image to display? Is it possible to have that function also display as an image? PDF would be the preferred format, since that's the output of our scanners, but if that's not possible, a .tiff or a .jpg would work.
Access does have a method of doing it, but to be honest, it's clunky and difficult and the people using it are not going to get it so if i can get this one function to work, it would be fabulous.
Even if I need a separate button to get the image to display, it would be better than not having the ability to display the image.
Thanks again
-Barb Quote: |
Originally Posted by ADezii You are quite welcome. Now, let's work on the Hyperlink part first. Make a slight change to the code in Line #11, as listed below. Select a Local File first, see if you can Navigate to it via the Hyperlink on the Form Field (txtSelectedFile), then a File on the Network. Let me know how you make out: -
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strSelectedFile = vrtSelectedItem & "#" & vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fd = Nothing
| | 
February 15th, 2008, 06:15 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover That worked perfectly, thanks!!
What about getting an image to display? Is it possible to have that function also display as an image? PDF would be the preferred format, since that's the output of our scanners, but if that's not possible, a .tiff or a .jpg would work.
Access does have a method of doing it, but to be honest, it's clunky and difficult and the people using it are not going to get it so if i can get this one function to work, it would be fabulous.
Even if I need a separate button to get the image to display, it would be better than not having the ability to display the image.
Thanks again
-Barb | I could incorporate code which would check the Selected File's Extension, and if it is one of the standard Graphic File Formats (*.bmp, *.gif, *.wmf, *.jpg) dynamically load the Image into an Iamge Control. This Control would have to have practical dimensions to be effective. Is this what you are looking for?
| 
February 15th, 2008, 11:35 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
Yes, that's exactly what I need.
Thanks so much for your help and your patience.
Have a wonderful weekend
-Barb Quote: |
Originally Posted by ADezii I could incorporate code which would check the Selected File's Extension, and if it is one of the standard Graphic File Formats (*.bmp, *.gif, *.wmf, *.jpg) dynamically load the Image into an Iamge Control. This Control would have to have practical dimensions to be effective. Is this what you are looking for? | | 
February 16th, 2008, 02:11 AM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Yes, that's exactly what I need.
Thanks so much for your help and your patience.
Have a wonderful weekend
-Barb | You have a nice weekend, also. I'll try to have a look at it during this weekend and see what I can come up with.
| 
February 16th, 2008, 02:12 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Yes, that's exactly what I need.
Thanks so much for your help and your patience.
Have a wonderful weekend
-Barb | I'm posting some revised code based on an Image Control on your Form named imgSelectedFile, but please download the Attached Test Database on this Thread to get a much clearer picture of what's going on. Let me know how you make out. -
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String, strImagePath As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strImagePath = vrtSelectedItem
-
strSelectedFile = vrtSelectedItem & "#" & vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Select Case Right$(strImagePath, 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
Me![imgSelectedFile].Picture = strImagePath
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fdg = Nothing
| 
February 17th, 2008, 12:54 AM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
It worked, but when i closed and reopened the form, the link was there, but the image didnt display. In fact, the attached file is the same way. How do I get the image to remain displayed?
Oh, one more thing. Is there a way to get this image to display in a report?
Thanks!
-Barb Quote: |
Originally Posted by ADezii I'm posting some revised code based on an Image Control on your Form named imgSelectedFile, but please download the Attached Test Database on this Thread to get a much clearer picture of what's going on. Let me know how you make out. -
Dim fdg As FileDialog, vrtSelectedItem As Variant
-
Dim strSelectedFile As String, strImagePath As String
-
-
Set fdg = Application.FileDialog(msoFileDialogFilePicker)
-
-
With fdg
-
.AllowMultiSelect = False
-
.InitialView = msoFileDialogViewDetails
-
If .Show = -1 Then
-
For Each vrtSelectedItem In .SelectedItems 'onby be 1
-
strImagePath = vrtSelectedItem
-
strSelectedFile = vrtSelectedItem & "#" & vrtSelectedItem
-
Next vrtSelectedItem
-
Me![txtSelectedFile] = strSelectedFile
-
Select Case Right$(strImagePath, 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
Me![imgSelectedFile].Picture = strImagePath
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else 'The user pressed Cancel.
-
End If
-
End With
-
-
Set fdg = Nothing
|
Last edited by truthlover; February 17th, 2008 at 01:34 AM.
Reason: Added question
| 
February 17th, 2008, 01:26 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover It worked, but when i closed and reopened the form, the link was there, but the image didnt display. In fact, the attached file is the same way. How do I get the image to remain displayed?
Oh, one more thing. Is there a way to get this image to display in a report?
Thanks!
-Barb | The following code will dynamically load specific 'Graphic' Image Types into the Image Control on your Form while viewing (based on the displayed Link). Place it in the Current() Event of your Form as indicated below. It is pretty self-explanatory, but if you need to know how it works, just let me know: -
Private Sub Form_Current()
-
If Not IsNull(Me![txtSelectedFile]) Then
-
Select Case Right$(Me![txtSelectedFile], 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
'Extract the Address Section from the Hyperlink
-
Me![imgSelectedFile].Picture = Left$(Me![txtSelectedFile], InStr(Me![txtSelectedFile], "#") - 1)
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else
-
Me![imgSelectedFile].Picture = ""
-
End If
-
End Sub
| 
February 17th, 2008, 09:09 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
There was no Current() option in the events. I am probably using the wrong type of image control. In fact, when I tried to put an image control in, it kept making me chose a source, so I ended up copy/pasting the image control from the sample you attached.
Can you tell me how to insert the proper Image control?
Thanks Quote: |
Originally Posted by ADezii The following code will dynamically load specific 'Graphic' Image Types into the Image Control on your Form while viewing (based on the displayed Link). Place it in the Current() Event of your Form as indicated below. It is pretty self-explanatory, but if you need to know how it works, just let me know: -
Private Sub Form_Current()
-
If Not IsNull(Me![txtSelectedFile]) Then
-
Select Case Right$(Me![txtSelectedFile], 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
'Extract the Address Section from the Hyperlink
-
Me![imgSelectedFile].Picture = Left$(Me![txtSelectedFile], InStr(Me![txtSelectedFile], "#") - 1)
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else
-
Me![imgSelectedFile].Picture = ""
-
End If
-
End Sub
| | 
February 18th, 2008, 12:21 AM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover There was no Current() option in the events. I am probably using the wrong type of image control. In fact, when I tried to put an image control in, it kept making me chose a source, so I ended up copy/pasting the image control from the sample you attached.
Can you tell me how to insert the proper Image control?
Thanks | Quote: |
There was no Current() option in the events.
| - Form Design View
- Properties
- Event Tab
- On Current
- Click on ... to advance to the Current() Event
Quote: |
Can you tell me how to insert the proper Image control?
| - Form Design View
- View ==> Toolbox
- Select Image Control then draw on Form
- Select any Graphic File then OK
- Select Image Control
- Properties
- Format Tab
- In Picture Property Delete the Path to the Graphic File
- Answer Yes to the Do you want to remove the Picture from Form prompt
- Rename the Image Control to imgSelectedFile
| 
February 18th, 2008, 02:47 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
That did the trick. Turned out the reason I couldnt find the Current () event is because I was looking for it in the image control properties and not the Form properties. Thank you for beign so patient with me.
One last question (I think). Is there a way to get the link and image to show up in a report too?
Thanks
-Barb Quote: |
Originally Posted by ADezii - Form Design View
- Properties
- Event Tab
- On Current
- Click on ... to advance to the Current() Event
- Form Design View
- View ==> Toolbox
- Select Image Control then draw on Form
- Select any Graphic File then OK
- Select Image Control
- Properties
- Format Tab
- In Picture Property Delete the Path to the Graphic File
- Answer Yes to the Do you want to remove the Picture from Form prompt
- Rename the Image Control to imgSelectedFile
| | 
February 18th, 2008, 06:15 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover That did the trick. Turned out the reason I couldnt find the Current () event is because I was looking for it in the image control properties and not the Form properties. Thank you for beign so patient with me.
One last question (I think). Is there a way to get the link and image to show up in a report too?
Thanks
-Barb | Not time right now, will return later.
| 
February 18th, 2008, 07:52 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover That did the trick. Turned out the reason I couldnt find the Current () event is because I was looking for it in the image control properties and not the Form properties. Thank you for beign so patient with me.
One last question (I think). Is there a way to get the link and image to show up in a report too?
Thanks
-Barb | Quote: |
One last question (I think). Is there a way to get the link and image to show up in a report too?
| Yes there is. It may be confusing to explain the entire process in the Post, but it is exactly the same code in the Form's Current() Event posted to the Format() Event of the Detail Section of a Report. I've kept the naming conventions the same to make it easy for you, simply create a Directory (Folder) in the Root Directory of Drive C: named PFDBMPS, namely C:\PFDBMPS. Download the Test Database for this Thread and copy the *.bmps to that Directory. Click on the View Report Button on the Main Menu to see how it is done. -
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
-
If Not IsNull(Me![txtSelectedFile]) Then
-
Select Case Right$(Me![txtSelectedFile], 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
Me![imgSelectedFile].Picture = Left$(Me![txtSelectedFile], InStr(Me![txtSelectedFile], "#") - 1)
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else
-
Me![imgSelectedFile].Picture = ""
-
End If
-
End Sub
| 
February 18th, 2008, 10:26 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| |
It worked great!
Now everything's doing what I wanted it to do.
Thank you sooooo much for all your help! Not only did you give me the information I needed, you did it in a way I could really make sense of.
If you dont already teach for a living, you should give it some serious thought.
-Barb Quote: |
Originally Posted by ADezii Yes there is. It may be confusing to explain the entire process in the Post, but it is exactly the same code in the Form's Current() Event posted to the Format() Event of the Detail Section of a Report. I've kept the naming conventions the same to make it easy for you, simply create a Directory (Folder) in the Root Directory of Drive C: named PFDBMPS, namely C:\PFDBMPS. Download the Test Database for this Thread and copy the *.bmps to that Directory. Click on the View Report Button on the Main Menu to see how it is done. -
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
-
If Not IsNull(Me![txtSelectedFile]) Then
-
Select Case Right$(Me![txtSelectedFile], 4)
-
Case ".wmf", ".emf", ".dib", ".bmp", ".ico", ".gif", ".jpg"
-
Me![imgSelectedFile].Picture = Left$(Me![txtSelectedFile], InStr(Me![txtSelectedFile], "#") - 1)
-
Case Else
-
Me![imgSelectedFile].Picture = ""
-
End Select
-
Else
-
Me![imgSelectedFile].Picture = ""
-
End If
-
End Sub
| | 
February 19th, 2008, 12:01 AM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover It worked great!
Now everything's doing what I wanted it to do.
Thank you sooooo much for all your help! Not only did you give me the information I needed, you did it in a way I could really make sense of.
If you dont already teach for a living, you should give it some serious thought.
-Barb | I'm glad it all worked out for you, truthlover. BTW, give yourself a pat on the back also for persisting until a solution was arrived at. As far as teaching, you are not gonna believe this one - I'm a retired Philadelphia Fireman after 32+ years who now works Security for a Performing Arts building (Kimmel Center).
| 
February 19th, 2008, 03:33 AM
| | Member | | Join Date: Jan 2008
Posts: 32
| |
Hi , ADezii!
you are great! i try to search and google around to find a solution to make a browse dialog button for almost a day but i still cannot get what i want.
But your code does make what i want works in just a short time!! i can't imagine that you are a retired fireman and still willing to share your knowledge !
Thanks again!
| 
February 19th, 2008, 01:27 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by beemomo Hi , ADezii!
you are great! i try to search and google around to find a solution to make a browse dialog button for almost a day but i still cannot get what i want.
But your code does make what i want works in just a short time!! i can't imagine that you are a retired fireman and still willing to share your knowledge !
Thanks again! | Thanks for the cudos, like everyone else here at TheScripts, we're always glad to help ya!
| 
February 20th, 2008, 04:47 AM
|  | Member | | Join Date: Dec 2007
Posts: 103
| | Quote: |
Originally Posted by ADezii I'm glad it all worked out for you, truthlover. BTW, give yourself a pat on the back also for persisting until a solution was arrived at. | Sorry to bother you again, but I'm afraid I'm having a problem with the reports. The image is showing up, but the same image is showing up for all of the records instead of the proper record showing up for each report.
Am I doing something wrong?
Thanks
| 
February 20th, 2008, 09:46 AM
| | Member | | Join Date: Oct 2007
Posts: 58
| |
hi,
Is there a way to put the image onto a Word document or Excel spreadsheet?
Andrew
| 
February 20th, 2008, 01:25 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover Sorry to bother you again, but I'm afraid I'm having a problem with the reports. The image is showing up, but the same image is showing up for all of the records instead of the proper record showing up for each report.
Am I doing something wrong?
Thanks | Is [txtSelectedFile] a Bount Text Box in the Detail Section of the Report, since that is what the code is reading?
| 
February 20th, 2008, 01:26 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by rudeman76 hi,
Is there a way to put the image onto a Word document or Excel spreadsheet?
Andrew | Kindly create a seperate Thread concerning this Topic.
| 
February 20th, 2008, 02:57 PM
|  | Member | | Join Date: Dec 2007
Posts: 103
| | Quote: |
Originally Posted by ADezii Is [txtSelectedFile] a Bount Text Box in the Detail Section of the Report, since that is what the code is reading? | I'm not sure. I did it the way you told me, so if that would create a Bound Text Box, then that's what it is. (I went back to look at the properties, but didnt see any clear indication if it is or not.)
One thing I found out, that might make a difference, is where the problem is occurring is when I run a report that includes all records.
The application is for Work Orders, most that will have corresponding maps. If I open the report for a specific Work Order #, I get the correct image displayed, but if I run a report of all open Work Orders, the image for the first open Work Order displays on all the Work Orders.
Thanks!
| 
February 20th, 2008, 04:36 PM
|  | Expert | | Join Date: Apr 2006 Location: Philadelphia Age: 59
Posts: 4,253
| | Quote: |
Originally Posted by truthlover I'm not sure. I did it the way you told me, so if that would create a Bound Text Box, then that's what it is. (I went back to look at the properties, but didnt see any clear indication if it is or not.)
One thing I found out, that might make a difference, is where the problem is occurring is when I run a report that includes all records.
The application is for Work Orders, most that will have corresponding maps. If I open the report for a specific Work Order #, I get the correct image displayed, but if I run a report of all open Work Orders, the image for the first open Work Order displays on all the Work Orders.
Thanks! | The code must reside in the Format() Event of the Detail Section, is that where you placed it?
| 
February 20th, 2008, 05:23 PM
| | | | |