How can one determine in code if an OLE Object type field has an object for
a particular record?
Thanks. 5 2084
If you have a Bound OLE Frame control on a Form then something like:
If NOT (IsNull(Me.NameOfYourOLEFrameControl.Value))
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Neil" <no****@nospam.net> wrote in message
news:u%*****************@newsread3.news.pas.earthl ink.net... How can one determine in code if an OLE Object type field has an
object for a particular record?
Thanks.
IsNull() was, of course, the first thing I tried. Returns False whether
there is an embedded object or not. Also tried all the other Is...()
functions (well, OK, I didn't try IsNumeric(), but, hey).
I was using "IsNull(Me.Picture)" (the name of the control). I tried what you
had with .Value at the end, but got a compile error: Invalid qualifier.
So, no matter what I try, I can't get find a way to differentiate between
when there is and isn't an embedded object.
Neil
"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:TC*******************@ursa-nb00s0.nbnet.nb.ca... If you have a Bound OLE Frame control on a Form then something like: If NOT (IsNull(Me.NameOfYourOLEFrameControl.Value))
-- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit.
"Neil" <no****@nospam.net> wrote in message news:u%*****************@newsread3.news.pas.earthl ink.net... How can one determine in code if an OLE Object type field has an object for a particular record?
Thanks.
I have just been through coding this type of thing for the first time. The
following snippet worked for me:
If Not IsNull(Me!Photograph) Then
stDocName = "frmPhotoUpdateDelete"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
This code is executed if you double-click on the photograph object frame.
If there is a picture, it opens a form where you can update or delete the
picture. If there is no picture, of course it does nothing.
HTH
--
Cheers,
Lyn.
"Neil" <no****@nospam.net> wrote in message
news:ny*****************@newsread1.news.pas.earthl ink.net... IsNull() was, of course, the first thing I tried. Returns False whether there is an embedded object or not. Also tried all the other Is...() functions (well, OK, I didn't try IsNumeric(), but, hey).
I was using "IsNull(Me.Picture)" (the name of the control). I tried what you had with .Value at the end, but got a compile error: Invalid qualifier.
So, no matter what I try, I can't get find a way to differentiate between when there is and isn't an embedded object.
Neil
Neil the code is correct. Are you sure you have a Bound OLE Frame
control on the form containing the code I posted?
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Neil" <no****@nospam.net> wrote in message
news:ny*****************@newsread1.news.pas.earthl ink.net... IsNull() was, of course, the first thing I tried. Returns False
whether there is an embedded object or not. Also tried all the other Is...() functions (well, OK, I didn't try IsNumeric(), but, hey).
I was using "IsNull(Me.Picture)" (the name of the control). I tried
what you had with .Value at the end, but got a compile error: Invalid
qualifier. So, no matter what I try, I can't get find a way to differentiate
between when there is and isn't an embedded object.
Neil
"Stephen Lebans"
<Fo****************************************@linval id.com> wrote in message news:TC*******************@ursa-nb00s0.nbnet.nb.ca... If you have a Bound OLE Frame control on a Form then something like: If NOT (IsNull(Me.NameOfYourOLEFrameControl.Value))
-- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit.
"Neil" <no****@nospam.net> wrote in message news:u%*****************@newsread3.news.pas.earthl ink.net... How can one determine in code if an OLE Object type field has an object for a particular record?
Thanks.
The problem was apparently a reserved name conflict. As I noted, my control
name was "Picture." When I changed it to "Picture1", IsNull() worked
correctly with it. When it was named "Picture," IsNull() always returned
False.
"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:XU*******************@ursa-nb00s0.nbnet.nb.ca... Neil the code is correct. Are you sure you have a Bound OLE Frame control on the form containing the code I posted?
--
HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit.
"Neil" <no****@nospam.net> wrote in message news:ny*****************@newsread1.news.pas.earthl ink.net... IsNull() was, of course, the first thing I tried. Returns False whether there is an embedded object or not. Also tried all the other Is...() functions (well, OK, I didn't try IsNumeric(), but, hey).
I was using "IsNull(Me.Picture)" (the name of the control). I tried what you had with .Value at the end, but got a compile error: Invalid qualifier. So, no matter what I try, I can't get find a way to differentiate
between when there is and isn't an embedded object.
Neil
"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message news:TC*******************@ursa-nb00s0.nbnet.nb.ca... > If you have a Bound OLE Frame control on a Form then something like: > If NOT (IsNull(Me.NameOfYourOLEFrameControl.Value)) > > -- > HTH > Stephen Lebans > http://www.lebans.com > Access Code, Tips and Tricks > Please respond only to the newsgroups so everyone can benefit. > > > "Neil" <no****@nospam.net> wrote in message > news:u%*****************@newsread3.news.pas.earthl ink.net... >> How can one determine in code if an OLE Object type field has an > object for >> a particular record? >> >> Thanks. >> >> >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bijay Kumar |
last post by:
Hi Guys,
I was going through the source code of Object.cs in rotor. What I found is
Equals() implemented as follows:
public extern virtual bool Equals(Object obj);
What I don't...
|
by: Daniel |
last post by:
Hello =)
I have an object which contains a method that should execute every x ms. I
can use setInterval inside the object construct like this -
self.setInterval('ObjectName.methodName()',...
|
by: Keith Rowe |
last post by:
Hello,
I am trying to reference a Shockwave Flash Object on a vb code behind page
in an ASP.NET project and I receive the following error:
Guid should contain 32 digits with 4 dashes...
|
by: DrUg13 |
last post by:
In java, this seems so easy. You need a new object
Object test = new Object() gives me exactly what I want.
could someone please help me understand the different ways to do the
same thing in...
|
by: Steven T. Hatton |
last post by:
This may seem like such a simple question, I should be embarrassed to ask
it. The FAQ says an object is "A region of storage with associated
semantics." OK, what exactly is meant by "associated...
|
by: sneill |
last post by:
How is it possible to take the value of a variable (in this case,
MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name?
In the following example I want 'oIcon' object to have...
|
by: Bijay Kumar |
last post by:
Hi Guys,
I was going through the source code of Object class (Object.cs in rotor). What I found is
Equals() implemented as follows:
public extern virtual bool Equals(Object obj);
What...
|
by: yb |
last post by:
Hi,
Is there a standard for the global 'window' object in browsers? For
example, it supports methods such as setInterval and clearInterval, and
several others.
I know that w3c standardized...
|
by: User1014 |
last post by:
A global variable is really just a property of the "Global Object", so
what does that make a function defined in the global context? A method
of the Global Object?
...
|
by: Ralph |
last post by:
Hi
I don't understand why it's not working:
function schedule(imTop){
this.tdImagesTop = imTop;
}
schedule.prototype.selectEl = function() {
alert(this.tdImagesTop);
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |