473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

preventing the emedding of an ole object into a form

Hi - I have a form that has an OLE field on it. I've set the properties of the field to only allow links. So when you right click on the form and insert an object, that works great. But you can bypass this by opening up Explorer and dragging a file into the field, in which case it gets embedded rather than linked. Any way to prevent that from happening?

Thanks in advance for the help.

Bill
Aug 24 '09 #1
7 2242
ADezii
8,834 Expert 8TB
@bkberg05
Have you set the OLE Type Allowed Property of the Object Frame to Linked?
Aug 24 '09 #2
yes, I have. Which is why this seems so strange. Again, if you right click and add the file, it is automatically linked. But if you drag a file into the field on a form, it goes right in and is then embedded. I can tell it's embedded since I can delete the source file and it still appears. When you link a file and delete the source file, it can't locate the file.
Aug 25 '09 #3
Megalog
378 Expert 256MB
Just a thought, since I dont work with OLE fields ever.. but maybe after that field is updated, you can test the data type in that record to see if it's a link or an object? If it doesnt pass the test, it clears it out and warns the user.
Aug 25 '09 #4
ADezii
8,834 Expert 8TB
@bkberg05
My guess on this matter would be the following. The Object Frame containing an OLE Object does not recognize Drag and/or Drop Events, at least in VBA. Since it does not recognize a Drop Event, which contains a Source Argument, it cannot possibly identify the Absolute Path of the Source, which is needed for the Dynamic Linking of that Object. Assuming all this is even True, there is no other option other than to Ember the Object.
Aug 26 '09 #5
I followed megalog's strategy and it worked great. Here's the snippet (without the warning).

If Me![Order_Backup].OLEType = acOLEEmbedded Then
[Order_Backup].Value = Null
End If
Aug 26 '09 #6
Megalog
378 Expert 256MB
Good job! I'm glad to see you ended up with a simple solution.
Aug 26 '09 #7
ADezii
8,834 Expert 8TB
@Megalog
Nice job Megalog, and to think that I was rambling on about Drag and Drop Events, Event Recognition, and other nonsense. Thank God I have a sensible individual to back me up! (LOL!).
Aug 26 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bruce | last post by:
I have a number of forms that do significant work based on variables POSTed from the form. What is the common method of detecting and preventing this work from being done when the form is POSTed as...
8
by: CJM | last post by:
How do people go about preventing the user from submitting a form for a 2nd time? For example, the user submits a form, clicks on the back button, and the submits the form again. I have used...
3
by: shortbackandsides.no | last post by:
I've been having trouble preventing users pressing Enter part way down a form so the incomplete form gets submitted. I came up with a possible solution - the code below seems to work in both...
5
by: Bill Henning | last post by:
Does anyone know a good method of preventing keyboard and mouse events from interrupting processing? My situation is: 1) I need to track and handle all key and mouse events 2) I need to perform...
5
by: Petec | last post by:
Is there a way to prevent a form from getting focus? Thanks! - Pete
13
by: M O J O | last post by:
Hi, I need to create a popup form what will not steal focus. I've searched the net and I managed to put some code together. Below is the result of my code, but I have a single question .......
10
by: bregent | last post by:
I've seen plenty of articles and utilities for preventing form injections for ASP.NET, but not too much for classic ASP. Are there any good input validation scripts that you use to avoid form...
0
by: Jeff Waskiewicz | last post by:
Here is what I am trying to accomplish. I have an MDI application on the left side of the client area I have a borderless form that holds a treeveiw for navigation. When an item is selected from...
12
by: Mark Rae | last post by:
Hi, See the previous thread Request.Form abuse in this newsgroup... I'm looking for a simple and efficient way to prevent people hijacking the <formtags on my websites and using them to send...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.