Shortcut to Access causes error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have Access 2000 db that I wanted to make changes to. I have always
opened any of my db with a shortcut on the desktop. I have just switched to
Vista Home and now I have a problem. If I open the db using the shortcut I
get an error message ("Object variable or with block variable not set") when
I trying to add a command button to a form. I also get the error if I
browse
to the file (using Explore) and open the file by double clicking on it.
However, if I first start Access and within Access open the db everything
works fine.

Is there someting I don't know about shortcuts or opening a file, or is this
another Vista problem? Has anyone else had this problem with Vista and
Access?
Thanks for you help.

Phil
 
Hi again,

More errors. It appears that anything the requires the wizard to place
items on a form gives an error. ie combo box, list box, command button, etc.


Once again, if I start Access first and then open my db eveything works great.

I created new db with no tables, forms or anything else. I saved the db and
I opened it by browsing (Explore) and double clicking on the file. I opened
a new form and when I i try to place a command button on the form I get the
errors.

I really would like to resolve this problem. Your help would be appreciated.
Thanks
 
The only thing I can think of to explain the behaviour you decribe might be
2 different installations of Access, and one of them is hosed. The
installation with Windows file associations (and referenced in your
shortcuts, if they specify a version) is hosed, but the one you open
directly via Startup>Programs is OK.

Even that doesn't sound right cause I thought File Associations for Access
got replaced with whichever Access version was most recently opened. (Open
Access directly, open a mdb, prove it works as expected. Close the file and
Access. Double click on the same mdb directly in Explorer (not a shortcut).
Does it still work or fall over? If it falls over, I'm stumped. If it works,
it sounds like you have competing installations.)

In either case, check ControlPanel>Add -Remove Programs anyway. How many
times does Microsoft Access and/or Microsoft Office appear (and which
versions)?

HTH,
 
Thanks George,

I already tried the various ways of opening the db. The only way I don't
get the errors is when I open Access first and then open the db from Access.
Opening from a shortcut or Explorer gives the errors.

This is a new computer with only one version of Access (Office) installed.

If you come up with something else please let me know.

Thanks again,
 
I already tried the various ways of opening the db. The only way I don't
get the errors is when I open Access first and then open the db from Access.
Opening from a shortcut or Explorer gives the errors.

You may need to use a more complex command line in the shortcut. Here's an
example of one I use:

"C:\Program Files\OFFICE11\MSACCESS.EXE" "H:\SomePath\PawTrax.mdb" /wrkgrp
"H:\SomePath\PawTrax.mdw" /excl

I.e. the command line starts by invoking the msaccess.exe executable, not the
database itself; that is passed as a parameter.

John W. Vinson [MVP]
 
Thanks John,

However I can't get past the first line. With this Vista I can't locate the
path for MSACCESS.EXE. Also are the quotes " needed?

thanks,
 
Thanks John,

However I can't get past the first line. With this Vista I can't locate the
path for MSACCESS.EXE. Also are the quotes " needed?

Well, I don't have Vista so I'm sort of at a loss. The quotes are needed if
any of the directory names or filenames contain a blank.

John W. Vinson [MVP]
 
Try right-clicking on the shortcut and selecting 'Run As Administrator'

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
 
Thanks Gina,

I tried that and there is no "Run As Administrator." I checked my other
desktop icons and some have it and some do not. I also disabled UAC and that
didn't help with my original Access error problem.
Thanks,
 
You said you an Access 2000 db, is that the version that is installed on the
machine that has Vista?
 
Yes,

And everything works fine except for this problem. I also have Access
Developer and it all works fine. I just have this error problem depending on
how I open the DB file.
Thanks again
 
Okay, let's try opening via the shortcut holding the Shift Key while
double-clicking. IF it opens go to the code window and check for missing
references.
 
Hi again,

Yes, it opened. Don't see any problems with references. I also created a
new db with no tables, reports, forms or anything else. I save the new db
and created a shortcut to it. I double click on the shortcut and the db
open. If I then create a new form in design view and try to add the command
button to the form I get the same error. It appears I get an error (not the
same error) with anything that uses the wizard. There is no code in my db at
time.
 
Well, it least we're making progress???? Sounds lke the wizards may be
corrupt, try doing a repair of the installation via the CD.
 
Thank you Gina,

I did a repair of my office install and now it works. I've had so many
other strange things happen with Vista I thought it was another problem with
Vista and didn't even think of a office problem.

Thanks again for your help, you were great!!!
 
No problem... glad I could help!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top