2950 Error in Access 2007 (1 Viewer)

Tiffosi2007

Registered User.
Local time
Today, 21:26
Joined
Sep 13, 2007
Messages
50
Hi,

I am running Access 2007 (SP1) on WinXP

I have created a macro that calls a function from within it. However, whenever you run the macro the 2950 error comes up. I have set my database folder as a trusted location but it still happens.

Any ideas?

Assuming this is a bug, can anyone suggest another way to run the code. Incidentally, when i try to run it direct from the Switchboard i get an error returned as well (although it doesn't tell me why). The functions does run fine on its own when done manually.

Thanks
 

Tiffosi2007

Registered User.
Local time
Today, 21:26
Joined
Sep 13, 2007
Messages
50
Follow Up

I still havent got anywhere with this problem unfortunately.

DB is trusted (and subfolders) i have also set it to run all macros to test this and it still does not work.

Researching this it seems as though a lot of other people have the same problem but i have yet to see a work around.

Can anyone help?

Thanks
 

RuralGuy

AWF VIP
Local time
Today, 14:26
Joined
Jul 2, 2005
Messages
13,826
Have you tried doing it with code instead? What is a 2950 error?
 

HilaDG

New member
Local time
Tomorrow, 06:26
Joined
Nov 25, 2008
Messages
7
Usually error 2950 means that the code run up to a certain point and then it had a bug. But if you tested it in a development environment (which I assume you had), then it seems to me as if it is a sign of a corrupted database. My solution was using my back up from couple of days ago. Lucky me, I had one. That worked. What to do if you don't have a back-up? Try copying tables, queries, macros and forms until you get a working database. alternatively, bang your head in the wall and swear. it reduces the frustration.
 

Uk4Canada

New member
Local time
Today, 14:26
Joined
Mar 23, 2009
Messages
1
I don't know If this helps or not. I have had the same problem with macro's. I wanted to be able to export files from my database to a excel file. The export worked fine, but If I cancelled the process I came up with the 2950 error. My solution was to convert the macro to code and then de-bug that. It has worked like a charm. If you are not sure of the code to use there are a lot of helpful people on this site who I am sure would be willing to help.
 

mokokamello

New member
Local time
Today, 22:26
Joined
Dec 9, 2009
Messages
1
it happened with me also. i realized it happens with SOME versions of MA Access 2007, but not OTHER versions of MS ACCESS 2007
 

Robjenj

Registered User.
Local time
Tomorrow, 06:26
Joined
Dec 17, 2009
Messages
21
Hi all! I'm creating an Access2007 db for a wildlife hospital. I'm trying to set a date in an unbound textbox control on a form from the time at which another control on that form is changed. I'm using the SetValue control in the Macro Builder to set the value now() in [Forms]![FRM_AG]![txbFAGsct], and getting the 2950 error with a note that I might be trying to enter an operand without an operator. The db resides in a "trusted" location. Any idea what more info the progam is looking for me to provide?!
Cheers!
Bob :confused:
 

MarcosRocha

New member
Local time
Today, 13:26
Joined
Jul 27, 2011
Messages
1
Hi I have solved the problem in this way:

1. There where a line on the form_load like this me.mylist.selected(0) = 1
2. I changed the line to me.mylist.selected(0) = 0
3. Done

I hope this could help you.
 

shakeelmscw

Registered User.
Local time
Tomorrow, 00:26
Joined
Nov 11, 2011
Messages
23
I am also facing the same error whenever i put these code in module1. if i remove the codes then everything works fine.


Public Function monthsselected() As Integer
If strmessage = 0 Then

strmessage = 1
monthsselected = strmessage
Else
monthsselected = strmessage
End If
monthsselected = strmessage

End Function


but i need to make a public function, what should i do?
 

a.e.nueman

New member
Local time
Today, 13:26
Joined
Jan 16, 2013
Messages
3
Hi, I realize this these posts were quite old, but I just had to add my findings. I took over an access 2003 project which was given to me as an access 2007 database. I am using access 2010.

I got the infamous "2950" error and I mean infamous as an understatement. This error occurred while trying to use a macro in the "on click" button. To make an incredible tedious and uninteresting story short, I tried just about everything :banghead: suggested in this and other forums. While writing my letter of resignation, it occurred to me that someone wrote to convert the macro to vba code. I not that good of a vba programmer, but the macro design ribbon in access 2010 has a convert to vba button. I did this and copied the code into my program and it worked! That it! DONE DEAL!

Note: The conversion process created a function to save a record and move to the next record. I changed everything relating to 'function' to 'sub'. Additionally, I had a set warnings off command before my move to next record command. Finally, when reviewing commands in 2010, make sure you push the button show all commands or you will miss things like set warnings off.
 

Users who are viewing this thread

Top Bottom