Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thumbnail questions

Status
Not open for further replies.

FacilitiesCAD

Technical User
Aug 4, 2003
39
US
I am making a database that lists about 2000 drawings. I would like to be able to view a thumbnail of each drawing as I look at its entry. The entry includes path, file_name,type,project_number and a few other bits of information. I can already put 1 thumbnail in but it doesn't change with the entries.
I went to:
1) toolbox \ more controls(icon)\ autocad drwgthumbnail control (icon)
2)I then make a box shape on the field
3)right click box for Autocad drawing thumbnail control object \ properties \drawing.

in this spot it only seems to allow text not a link to the field that has path and file name or Im just doing something wrong.

Any ideas apreciated.

Tim
 
I have responded in the following thread: thread702-289543

This thread addresses many of the issues that may have with the use of Thumbnail pics in a form or report.

Post backif you have more questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Bob,
The post you sent me to looks great. I've had a little trouble following it. Basically I ran into a few problems.
1st) My file is a .dwg file (It is an AutoCAD drawing that has a thumbnail of itself stored somewhere in it.

2nd) I didn't find the "On Current event" option I tried the "on click option" and ran into the error "Microsoft ACCESS can't find the macro 'me!pictureIMAGE' the macro doesn't exist etc.

You have given me some inspiration and I will try something to set the image that is there to a new value. I hope it works and thanks for the inspiration if not the solution.

Tim
 
[tt]
You write: I didn't find the "On Current event" option I tried the "on click option".

The On Current event is a property of the form...the On Click event is a property of the control.[/tt]

[tt]
Gus Brunston - Access2000/2002(DAO)[/tt]
 
Thanks Gus for helping out here. You are right on both counts. I haven't been receiving my TT email notifications so I didn't know there was activity here.

Tim: Just what are you talking about with the Me!PictureImage? I may have been referencing to a Image control on a form called PictureImage. The reference to that control would Me!PictureImage or Me.PictureImage. I was probably just making a reference to a control on a form. There is a .Picture property for an image control. This is where you would put the path for the picture to be displayed.

Hope this helps you out. Post back if you have more questions.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Thanks both of you for the help. I have found the solution to my problem at this point. The problem with scriverb solution is that my thumbnails are part of the autoCAD drawing and not a sepperate jpg or bmp or wmp file. The solution in my case was : to do as I wrote in the first part of this thread and make a command button with the following linked to the on click event.

Me![ActiveXCtl28].Visible = True
Me![ActiveXCtl28].Value = Me![Text26]

in this case [ActiveXCtl28] is the autoCAD thumbnail I made in the first part of this thread and [Text26] is the path and filename of my autoCAD drawing. I set Me![ActiveXCtl28].Visible = False when opening the form and when "on current". I know that instead of using the control button I could set Me![ActiveXCtl28].Value = Me![Text26] to "on current" but some of my drawings are so old that they dont have thumbnails and I haven't worked on the error recovery yet.

my new opportunity for improvement is to write some vb code to input new drawings automatically. I'll write a new post about it if anyones intrested but basically I have a BAT routine that creates a .txt file listing the directories and files of all .dwg files in a specific directory and all sub directories.
I then use some vb in excel to organize the information into 5 collumns
Path Size Date Time File
Then I can copy and paste them into access.

It sounds like I could do it all in access if I just new a few more tricks. Like how to goto a new record (next record) in access vb code. in excel I just have a loop

for m=1 to i
cell(m,1)=path
cell(m,2)=size
cell(m,3)=date
cell(m,4)=Time
cell(m,5)=File
next m

in access Im guessing
me.path = path
me.size = size
etc

if I could just loop to the next record somehow.

Anyhow thanks everyone.



 
In ACCESS to update a file like this you would use a recordset and loop through the recordset and make you updates.

EXAMPLE:
Code:
Dim db as DAO.Database
Dim rs as DAO.Database
Set db = CurrentDB
Set rs = db.OpenRecordset("yourtablename", dbOpenDynaset)
rs.movefirst
Do
   rs.edit
   rs("Path") = path
   rs("Size") = size
   . . .
   rs.Update
   rs.MoveNext
Loop Until rs.EOF
rs.close
db.close

Now the above code is just an example of how to loop through a recordset(table or query) and update the records from beginning to end. But, you will need to match your imported table to the correct records to update the fields that are appropriate. I don't see any identifying fields in your example. ACCESS can link to excel file and read it as a table. But, you must have a recordID or partID or something to match those records up to your main table for the update process to take place.

Hope this helps you out here.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top