By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,401 Members | 928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,401 IT Pros & Developers. It's quick & easy.

on click error

P: n/a
i had a button on a form. when clicked, the button runs code that
retrieve the values of unbound textboxes on the form and saved the
values in a table. the application runs fine on all pc except one. on
this one pc, when the button on the form is clicked, it gives this
error message: "the expression on click you entered as the event
property setting produced the following error: there was a problem
accessing a property or method of the OLE object."

the form consists of only 1 tab control, textboxes and combo boxes.
what is the cause of the error message and how do i remove it? any
help will be appreciated.
Dec 12 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
There might be a problem with references on that machine:
http://allenbrowne.com/ser-38.html

A decompile might solve it.

If it's on Windows Vista, the might be permission issues:
http://allenbrowne.com/bug-17.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<fr*****@gmail.comwrote in message
news:52**********************************@d21g2000 prf.googlegroups.com...
>i had a button on a form. when clicked, the button runs code that
retrieve the values of unbound textboxes on the form and saved the
values in a table. the application runs fine on all pc except one. on
this one pc, when the button on the form is clicked, it gives this
error message: "the expression on click you entered as the event
property setting produced the following error: there was a problem
accessing a property or method of the OLE object."

the form consists of only 1 tab control, textboxes and combo boxes.
what is the cause of the error message and how do i remove it? any
help will be appreciated.
Dec 12 '07 #2

P: n/a
On Dec 13, 12:03 am, "Allen Browne" <AllenBro...@SeeSig.Invalid>
wrote:
There might be a problem with references on that machine:
http://allenbrowne.com/ser-38.html

A decompile might solve it.

If it's on Windows Vista, the might be permission issues:
http://allenbrowne.com/bug-17.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<fred...@gmail.comwrote in message

news:52**********************************@d21g2000 prf.googlegroups.com...
i had a button on a form. when clicked, the button runs code that
retrieve the values of unbound textboxes on the form and saved the
values in a table. the application runs fine on all pc except one. on
this one pc, when the button on the form is clicked, it gives this
error message: "the expression on click you entered as the event
property setting produced the following error: there was a problem
accessing a property or method of the OLE object."
the form consists of only 1 tab control, textboxes and combo boxes.
what is the cause of the error message and how do i remove it? any
help will be appreciated.
thanks for your reply. how do i do a decompile?

Dec 12 '07 #3

P: n/a
thanks for your reply. how do i do a decompile?

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Then open Access (holding down the Shift key if you have any startup code),
and compact. Twice.

Explanation:
An MDB contains 2 copies of the code:
- the text that you see and edit;
- the binary (compiled code) that actually executes.
These 2 can get out of sync.

The binary is different for every version of Access. Later versions can use
the binaries from earlier ones, but as soon as you modify anything, it gets
recompiled into the new version. If you open with an older version, it can't
read the newer binary, so it recompiles into the old one. This is all
supposed to happen transparently, but in fact errors occur, it bloats, and
there can be weird problems (such as phantom break points, or code that
won't stay compiled.)

A decompile explicitly instructs Access to dump the entire binary. Then you
compact (to completely remove the discarded binary.) It now re-creates the
binary from the text version, and so these particular kinds of error are
gone.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

Dec 13 '07 #4

P: n/a
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
is there any tools out there to do this in batches? or at least
something that would take less time then a command promt.

dont get me wrong, i think it is great that we can do it at all, but
it would be nice to be able to browse to the file and hit a button.
this is windows after all. :)
Dec 14 '07 #5

P: n/a
On Dec 14, 11:34 am, DawnTreader <alanrt...@gmail.comwrote:
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

is there any tools out there to do this in batches? or at least
something that would take less time then a command promt.
you could always create a shortcut with that exact command in it. That
way you just double click the short cut everytime...

Tim
Dec 14 '07 #6

P: n/a
On Dec 14, 8:50 am, Tim Ricard <tric...@gmail.comwrote:
On Dec 14, 11:34 am, DawnTreader <alanrt...@gmail.comwrote:
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
is there any tools out there to do this in batches? or at least
something that would take less time then a command promt.

you could always create a shortcut with that exact command in it. That
way you just doubleclickthe short cut everytime...

Tim
i had tried that, the shortcut on the start menu isnt a good place to
start. works better if you navigate to the exe and create a shortcut
from scratch.

works good. :)
Dec 14 '07 #7

P: n/a
There are various approaches for this.

What I personally do put a text file on the desktop, and include a line for
each of the databases I'm working on at the moment. Double-click the file to
open in Notepad. Copy the appropriate line. Paste into the command prompt,
holding down Shift to avoid the startup code.

Since I'm using 5 versions of Access, I can create the appropriate line for
each mdb/accdb.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"DawnTreader" <al*******@gmail.comwrote in message
news:ca**********************************@e6g2000p rf.googlegroups.com...
On Dec 14, 8:50 am, Tim Ricard <tric...@gmail.comwrote:
>On Dec 14, 11:34 am, DawnTreader <alanrt...@gmail.comwrote:
Decompile a copy of the database by entering something like this at
the
command prompt while Access is not running. It is all one line, and
include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe"
/decompile
"c:\MyPath\MyDatabase.mdb"
is there any tools out there to do this in batches? or at least
something that would take less time then a command promt.

you could always create a shortcut with that exact command in it. That
way you just doubleclickthe short cut everytime...

Tim

i had tried that, the shortcut on the start menu isnt a good place to
start. works better if you navigate to the exe and create a shortcut
from scratch.

works good. :)
Dec 15 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.