Photo DB

CEH

Curtis
Local time
Yesterday, 18:25
Joined
Oct 22, 2004
Messages
1,187
I want to do something with a photo DB, but not sure how to make it work.....OK, we've all seen alot of the different, really nice DB's people have done for photos on here...using the path to the folder where the photo resides. Mines set up that way... Basically set up so I can have a memo field, so you can search for keywords in that field to find the photo you are looking for. Well, everything is working fine. But we all know you can't do any manipulating or editing of photos with Access. So what I want to be able to do is, after you find the photo, be able to click a cammand button to open the found photo in whatever photo program you have set as your default program. Ideas???
 
You could use the path with FollowHyperlink or Shell.
 
What a siimple little code..... :) Thanks Paul...
Is this the correct syntax? Works fine...opens window viewer. Where would I insert the .exe of another photo program if I wanted to set up a choice?

Code:
Private Sub CommandFollow_Click()

    Dim strPath As String
        strPath = Me.imagepath
            Application.FollowHyperlink strPath, , True
            
End Sub
 
FollowHyperlink will use whatever program is associated with the file type (in Windows). If you want to specify the program, you can use Shell.
 
OK... Haven't used "Shell" before so.... little fit of dumbness here :) I have 2 textboxes you fill via command buttons.... The photo program "ProgramPath" and one to the image.." ImagePath" The shell like this
Code:
Private Sub CmdCall_Click()
Call Shell("""[ProgramPath]""[imagepath]", vbNormalFocus)

End Sub
Program path text is "C:\Program Files\ArcSoft\PhotoStudio 2000\PhotoStudio.exe" and the image path text is "C:\images\USAFL.WMF"
So....Is my syntax on the Shell wrong? Getting errors back.....runtime error 53.
BTW.... each separately works fine..... opens the pic or program.
 
Try using ShellExecute as oppossed to Shell.
 
Something not there yet.......... trying ShellExecute.....
Basically have this......
Code:
Private Declare Function ShellExecute _
Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

And on the button......
Code:
Private Sub cmdTest_Click()
Dim strFullPath As String

strFullPath = "Me.AppName" & "me.txtImagePath"
Call ShellExecute(0, "open", strFullPath, vbNullString, vbNullString, 2)
End Sub

Not doing anything...............:confused:
 
Untested, but try

strFullPath = Me.AppName & " " & me.txtImagePath
 
Same thing........ No errors...... but nothing happens.
 
OK got it......... You were close Paul!!

Code:
Private Sub cmdTest_Click()

Dim strFullPath As String

strFullPath = ([txtAppName] & " " & [txtImagePath])

Call Shell(strFullPath, 1)

End Sub

This works fine......
I may post this DB after it is complete... I think it may be very usefull and havent seen one like it on here..... You should be able to search the DB to find your photos and then pick which app you want to open them in. I might add some categorizes and sub categories to make a search easier and maybe some fields for info on the camera...camera settings.... Might be a good one! And utilizes a lot of function not in common DB's.
Thanks for the help!!!
 
HELP!!!!!!!!!!!!!!!!!!!
OK....... I got the second part working...after I got home did a little tinkering to add some things...... So now when I go to add a new photo.......IT DOESN"T DO IT!! I have looked at this for hours.... The code is messed up someplace... But I can't see where!! Can someone take a look for me?? You will need to add a photo program from the main menu... on the second form you will see I get an error when trying to add a new photo.

On a side note..... I added the "Close" button in 2007.... Why the "on dirty" reference? I used the button wizard....
 

Attachments

I would have the form bound just to the images table, and have a combo that was bound to the images table but got its selections from the subject table. The error is due to the fact that when you try to add an image, it doesn't have a subject.
 
Thanks for the look Paul.... I think this one comes from not living up to my motto of "plan far ahead...VERY far ahead"...... I went back to step one.... One form. I'm starting from there. I'll plan out the whole app and continue. We'll see if I still have any problems then.... I already am of course.... I am just using Paint.net as the photo programs... some .jpg's it will open...others it says it doesn't recognize the format.... Well, we'll see if the photo programs I have and use at home treat the pics any differently.
Thanks for the look and help.....
 

Users who are viewing this thread

Back
Top Bottom