469,926 Members | 1,694 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

Macro Error 2950


I have been working on a database and have found a peculiar error.

When I open up my database and choose a form called "add inventory", then click on "view reports" and then, finally, double click on a report to view it shows up correctly.

However, I have created a search form that does not allow any changes but view/read only. I have the identical command to "view reports" as the "add inventory" form. When I click on the link "view reports" the form pulls up correctly. However when I attempt to double click on any of the reports I received an error.

Specifically it states:
An expression you entered is the wrong data type for one of the arguments.

You tried to run a macro or use a method to carry out an action, but an expression evaluated to the wrong data type.
For example, for the Close method you specified a string for the Object Type argument, but this argument can be set only to certain intrinsic constants or their numeric equivalents.

When I click "OK" an Action Failed window pops up:

Macro Name:
View Reports Macros.lstReports : On Dbl Click


Action Name:

Report by Location, 2, ,

Error Number:

I am currently running Office 2007 and the database is Trusted.

What perplexes me is that the "View Reports" form/window works in one editable form however when the same form/window is called from a non-editable form the forms do not work? Why? They are all being called by the same Macro...

I welcome any information.

Nov 11 '08 #1
1 13056
3,532 Expert 2GB
The problem you describe along with the error message you report doesn't make a lot of sense, but that's not really unusual with Access! The error messages that appear often have no real relation to the errors that have occurred!

The control you're trying to click on is apparently named


which I'm guessing, from its prefix of


is a Listbox. If this is correct, I suspect that this is the problem. Comboboxes and Listboxes, on a Read-Only form, are essentially locked, and you cannot make a selection from them, which is what you're attempting to do. I think you're going to have to change your form from Read-Only to get the results you want.

Linq ;0)>
Nov 11 '08 #2

Post your reply

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

Similar topics

2 posts views Thread by MLH | last post: by
reply views Thread by =?Utf-8?B?amtyYW1vczIwMDU=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.