PDA

View Full Version : MS access question


maximus
10-01-2005, 02:02 AM
I went to MR Ecel but they have not answered my question for over teo weeks (even with three bumps).

Here is the question;

First off, I would like to say that my knowledge is very basic. I have taught myself everything I know about access or excel either by reading or being online asking questions like this. I have yet to go to school, however, I plan on doing so very soon.

I am new here. I also did do a search on my topic but since my question is a bit different and for different purposes I will ask it here.


My goal is to get images to correspond with statistics (or a set of stats). What I am doing is that I am dumping/extracting pro-football player statistics (which are in csv format) from a PC based pro-football simulation called Front Office Footbal (its a football management game)l. I am able to get the statistics I want into access and into a database easily - that is not my problem. The problem I am having is getting the stats (or a player card with his career stats) to correspond with an image of a player (his picture for example). I do know that I have to create a folder next to the datbase and fill the folder with player images (or "pics") in order for the DB to see it, however, thats is all I know. Right now I have the stats in a table format and will be setting up that to view as HTML which will be the player card (think of the back of a baseball card and you'll understand what I want).



A few other things I may need is how to make a nice looking HTML format to view the player cards in.

PS.
I do have VB.Net but have only used it a few times since I really know nothing at all about programming or coding. Again, I am trying to learn as I go and teach myself - well, until I get into school that is.

Eventually, I would like to build a utility that does this automatically for me (something that will read from the extracted data *which are in csv format* and then build a pro-football reference site on my had drive.) It will only be used on my PC for my own enjoyment.

Any hep with this is GREATLY appciated. Thank you.

kenparker23
10-01-2005, 08:16 AM
This can be done. Insert this code into your worksheet. This will take the values of cell A1 and insert a picture with the same name. This also assusmes that your folder with the images is in C:\Logos. You also need to create an picture object in your worksheet. I can send you an example if you would like or if you do not understand.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim WS As Worksheet
Dim FName As String
If Not Application.Intersect(Range("A1"), Target) _
Is Nothing Then
FName = "C:\Logos\" & Target.Text & ".gif"
If Dir(FName) <> "" Then
Set WS = ActiveSheet
WS.OLEObjects("Image1").Object.Picture = _
LoadPicture(FName)
End If
End If
End Sub

gottimd
10-01-2005, 08:57 AM
I went to MR Ecel but they have not answered my question for over teo weeks (even with three bumps).

Here is the question;



Any hep with this is GREATLY appciated. Thank you.Maximus, just a word of note, people will respond faster on that board if you phrase your question in terms of work. If you ask a question that seems like you are doing something for leisure or sports, they are less likely to respond.

Edit: After three bumps you should have bumped a last time with "ARE YOU NOT ENTERTAINED?!?!?!?!"