db BLOATING

Surjer

Registered User.
Local time
Today, 22:09
Joined
Sep 17, 2001
Messages
232
I have designed a form to automatically put photos in a table. The problem is that the db is getting huge after just a few pictures---- There will be about 621 photos total...

here is my code.....

ohhh yeah. I am linking them (Not embedding) please help.


Private Sub Command8_Click()

Dim I As Double
On Error GoTo ERR_HAN

For I = 1 To 207

[CON_PHOTO1].OLETypeAllowed = acOLELinked
[CON_PHOTO1].SourceDoc = "C:\2002Projects\FBN\Ky\PHOTOS\EXISTING\" & Me.DESIGNATION & "-" & Me.PID & "-1.JPG"
[CON_PHOTO1].Action = acOLECreateLink
[CON_PHOTO1].SizeMode = acOLESizeStretch

DoCmd.GoToRecord , , acNext
[CON_PHOTO1].SourceDoc = " "
Next I

ERR_HAN:
If Err.Number = 2101 Or 2778 Then
Resume Next
Else: MsgBox (Err.Number & " " & Err.Description)
End If
Exit Sub


End Sub



Thanks,
Jerry
 
Can you convert that to 97 (PLEASE)

Sorry

Jerry
 
thats awesome!!!!

2nd part)

How do I check to see if the file exist?

I dont want the field to be filled in unless there is a picture available........

I dont want to use a common dialog to pic the file because I already know what the file names are....

I am basically trying to use this to see if all the photos that need to be taken, Have been.

Plus i am using them to make a nice little report on it with the photos.


So the basic thing is (I think that your code will work like a champ, I just need to know how to check if the file exist...

I used an error handler in my code to just ignore the errors of "File doesnt exist" but with your code it will just put the text in no matter what?

Thanks again,
Jerry
 
I actually have the field with the path invisible and only the pic displayed. Check the report code (I think it's the detail - format from memory) which displays the different pic for each record.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom