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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Put picture where textbox is 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
So, now for the next level...

I have some textboxes on a form. They load now based on location information.

I want to add model# to the query and depending on the model#, load a particular image (always the same image for each model#).

My only stipulation is that the image load at the same upper left corner as the textbox. The images will be the right height an width already.

So how would this be done? Would I have to put unbound OLE objects everywhere there is a textbox?

Thanks. Sean.
 
How are ya perrymans . . .

Bound or unbound / single or continuous form?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Sorry for the delay...

It is an unbound form, single form, loaded from a combo box selection.

Thanks. Sean.
 
Alright, I am chugging along here.

I am getting the results I need to show the pictures in the right places... BUT...

I can seem to change the picture height.

If I leave out the code for setting the image height, it displays (at the default .1667").

But if I try and set the image height to something else (.3333"), then the images don't display at all!

Code:
   If rst![Model] Like "*380*" Then
        Me("image" & rst![RackConfig]).Visible = True
        Me("image" & rst![RackConfig]).Picture = strDL380
        Me("image" & rst![RackConfig]).Height = lngDL380Height
   End If

So if the model is like *380*, it makes the image control visible, sets the picture, and trys to set the height.

There are 42 image controls, imageu01 through imageu42.

I am looping through the recordset which tells what U location the item is at (rst![RackConfig] = U42). SO I am building the name "imageu42" while looping through the recordset.

What am I doing wrong?

Thanks. Sean.
 
No sooner did I post this than I thought about those darn TWIPS!

.3333" = ~454 twips!

Now it works!

I am on my way to auto-generated graphical elevation views of our data center racks now!

Thanks. Sean.
 
perrymans . . .

Go Perry! . . . Go Perry! . . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top