Re: Editing linked images
- From: efandango <efandango@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Feb 2007 13:43:05 -0800
Hello Rob,
Thanks for your feedback. The reason I want to do inline editing is because
the images are maps, and the map details are in a another form on the same
page, this way the user can see the details, and see the changes that he
needs to make on the map.
But, never mind, i am thinking of using Flash instead (not for editing), but
have a question; Do you know a way where I can link 2 Flash files to each
form based record in the same way that you have suggested for bitmap images.
I have tried using the method you prescribe, but it doesn't work. I'm
stumped, and would appreciate some advice.
regards
Eric
"Rob Parker" wrote:
Sorry, I'm not aware of any method of doing that. It's probably possible -.
in fact that's what several other apps do, including MS Graph, which is what
you get to (perhaps without even knowing it) when you double-click a chart
in a form to edit it. And it's likely to be what your other database was
doing. However, as I said, I can't tell you a method of doing so. And
there seems to me to be no really compelling need to do so.
If you really want to find out if it's possible, I suggest you post a new
message, with a more specific subject.
HTH,
Rob
"efandango" <efandango@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E2174454-7C87-4E4A-B8CB-1CFC2AA8935D@xxxxxxxxxxxxxxxx
Hello Rob,
You are correct, I don't understand the information, though I greatly
appreciate your help with this problem. I have now managed to make it work
sucessfully by following your instructions. I can now double click on the
images and edit them.
Do you know how I can edit them within the form, without having to go
'outside' the Access window. I could do this in another database when the
pics were embedded into it; and when i wanted to edit, Access would just
call
the MS Paint OLE menus, and I was able to edit 'In Form'
regards
Eric
"Rob Parker" wrote:
That sounds like you don't understand the information in the link I
posted,
and you've simply put the published code into the double-click event of
your
image control. Doing that will flag these lines as errors, since they
are
public declarations which must appear before any functions/subroutines
(ie.
at the top of the module). The code at
http://www.mvps.org/access/api/api0018.htm must be pasted into a standard
module (which cannot have the same name as any of the routines in it - in
my
applications I generally put such routines into a module named
APIFunctions). The double-click event of the image control simply calls
this code; all it really needs is a declaration and a single line of
code:
Dim strReturn as String
strReturn = fHandleFile(txtImageFile, WIN_NORMAL)
I add some additional code to deal with the possible error conditions
returned (in strReturn) by the fHandleFile function. This is the actual
code from one of my applications (it's actually from a textbox control
containing the image path/filename, and this routine is called from the
double-click event of the image control - there are two controls in my
form
which a user can double-click to open the image file for editing) :
Private Sub txtImageFile_DblClick(Cancel As Integer)
On Error GoTo txtImageFile_DblClick_Error
Dim strReturn As String
If Not IsNull(txtImageFile) Then
strReturn = fHandleFile(txtImageFile, WIN_NORMAL)
Select Case Val(strReturn)
Case 0, 11, 31
MsgBox strReturn
Case 2
MsgBox "The file was not found." & vbNewLine & _
"It may have been moved or deleted." & vbNewLine & vbNewLine & _
"Use the 'Insert Image' button to re-link to the file if
desired.",
vbInformation, "File not found"
Case 3
MsgBox "The path to this file was not found." & vbNewLine & _
"A network resource may be unavailable (perhaps temporarily)." &
vbNewLine & vbNewLine & _
"You may use the 'Insert Image' button to attempt to re-link to
the
file.", vbInformation, "Path not found"
Case Else
End Select
End If
On Error GoTo 0
Exit Sub
txtImageFile_DblClick_Error:
If Err.Number = 490 Then MsgBox "The file was not found." &
vbNewLine
& _
"It may have been moved or deleted." & vbNewLine & vbNewLine & _
"Use the Insert Image button to re-link to the file if desired.",
vbInformation, "File not found"
Resume Next
Else
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure
txtImageFile_DblClick of VBA Document Form_sbfrmArising_Remarks"
End If
End Sub
Again, HTH,
Rob
"efandango" <efandango@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7D5634D6-C81C-4157-AC9B-77F4D6C13EFD@xxxxxxxxxxxxxxxx
Rob,
I gave it a try, but it throws these 3 lines up as 'red' error lines:
Public Const WIN_NORMAL = 1 'Open Normal
Public Const WIN_MAX = 3 'Open Maximized
Public Const WIN_MIN = 2 'Open Minimized
I don't know why, but thanks for the suggestion. I'll take the event
out
and
check if windows has unregistered the .bmp file extension.
"Rob Parker" wrote:
It's possible to do this if the image type of the linked file has been
registered on your system (ie. the file extension is associated with
an
image editing program); you need to code the double-click event of the
image
control to call the appropriate code. As for the code to use, I
suggest
the
ShellExecute API via the code at
http://www.mvps.org/access/api/api0018.htm
HTH,
Rob
"efandango" <efandango@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AB053DA2-ED25-4C82-9D59-1E54CC992D8E@xxxxxxxxxxxxxxxx
I have an image(s) in an Image Box and I can't edit it by
double-clicking.
I'm using the 'Image Frame', and not bound/unbound object frames.
The
image
is Linked and not embedded. Will Access only allow direct editing
using
embedded images or is it possible to double-click a linked image and
have
MS
Paint or any other OLE app open the image for editing?
the error message I get:
A problem occured while Microsoft Access was communicating with the
OLE
server or Active X Control
Cloe the OLE Server and restart it outside of Microsoft Office
Access.
Then
try the original operation again in Microsoft Office Access.
- Follow-Ups:
- Re: Editing linked images
- From: Rob Parker
- Re: Editing linked images
- References:
- Re: Editing linked images
- From: Rob Parker
- Re: Editing linked images
- From: Rob Parker
- Re: Editing linked images
- From: efandango
- Re: Editing linked images
- From: Rob Parker
- Re: Editing linked images
- Prev by Date: Re: Remove Warning Messages
- Next by Date: Re: Date Format
- Previous by thread: Re: Editing linked images
- Next by thread: Re: Editing linked images
- Index(es):
Relevant Pages
|