A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Error 2950



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2010, 05:14 PM posted to microsoft.public.access
relativehunter
external usenet poster
 
Posts: 11
Default Error 2950

I am having a problem with a form and a query. When I open the form (called
Paper), it runs a query that adds a row to a table called Time. If Paper is
open and I try to run a query to see my total time on the form, I get a 2950
error. If I close the Paper form, then I have no problem calling the total
time query. I tried doing an explicit close of the Time table in the macro
that sends the row to the Time table, but that did not solve the problem. Any
ideas?
  #2  
Old May 25th, 2010, 05:35 PM posted to microsoft.public.access
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Error 2950

Does your query have a start time and end time.
If so, you can't run the query to see your time on Paper with Paper still
open as you will not have an end time and the query will (when you try and
open it) try a half calculation (that like say 1 + = intead of 1 + 1 =).

Maybe I am not understanding.

Can you post the sql so we cna see it


--
Wayne
Manchester, England.



"relativehunter" wrote:

I am having a problem with a form and a query. When I open the form (called
Paper), it runs a query that adds a row to a table called Time. If Paper is
open and I try to run a query to see my total time on the form, I get a 2950
error. If I close the Paper form, then I have no problem calling the total
time query. I tried doing an explicit close of the Time table in the macro
that sends the row to the Time table, but that did not solve the problem. Any
ideas?

  #3  
Old May 25th, 2010, 05:57 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Error 2950

Post the SQL to your query, so we can see if we spot something. What is the
text of Error 2950? What version of Access are you using?

--
Daryl S


"relativehunter" wrote:

I am having a problem with a form and a query. When I open the form (called
Paper), it runs a query that adds a row to a table called Time. If Paper is
open and I try to run a query to see my total time on the form, I get a 2950
error. If I close the Paper form, then I have no problem calling the total
time query. I tried doing an explicit close of the Time table in the macro
that sends the row to the Time table, but that did not solve the problem. Any
ideas?

  #4  
Old May 25th, 2010, 06:53 PM posted to microsoft.public.access
relativehunter
external usenet poster
 
Posts: 11
Default Error 2950


The message specifically is "The expression is typed incorrectly, or it is
too complex to be evaluated." And gives an example.

The query is: SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((DateValue([Start]))=DateValue([Forms]![Times]![Start])) AND
((DateValue([End]))=DateValue([Forms]![Times]![End])))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End];
I have a form to select the beginning and ending dates.
  #5  
Old May 25th, 2010, 06:54 PM posted to microsoft.public.access
relativehunter
external usenet poster
 
Posts: 11
Default Error 2950

I tried to insert both the start and end times (just made end time = start
time so that there was not a null in the end time, but that did not seem to
work either).

"Wayne-I-M" wrote:

Does your query have a start time and end time.
If so, you can't run the query to see your time on Paper with Paper still
open as you will not have an end time and the query will (when you try and
open it) try a half calculation (that like say 1 + = intead of 1 + 1 =).

Maybe I am not understanding.

Can you post the sql so we cna see it


--
Wayne
Manchester, England.



"relativehunter" wrote:

I am having a problem with a form and a query. When I open the form (called
Paper), it runs a query that adds a row to a table called Time. If Paper is
open and I try to run a query to see my total time on the form, I get a 2950
error. If I close the Paper form, then I have no problem calling the total
time query. I tried doing an explicit close of the Time table in the macro
that sends the row to the Time table, but that did not solve the problem. Any
ideas?

  #6  
Old May 27th, 2010, 09:23 PM posted to microsoft.public.access
relativehunter
external usenet poster
 
Posts: 11
Default Error 2950

I changed the update query to fill in the same time in both begin and end, so
that end had a non-null time. Got the same exact message. Simplifying the
query does not seem to be necessary, since when the Paper form is not open,
the query runs fine. Seems to be some kind of interaction between the two
open objects.

"Daryl S" wrote:

Relativehunter -

Can your Start or End values in the table be null? If so, you need to
address that. I assume if they are null, then you don't have a Total time
for those records, and they should be exluded (see the WHERE clause below).

Also, I assume the form's Start and End fields are true dates. If your
table Start and End fields are true date/time fields, then simplify the query:

SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((Times.[Start])=[Forms]![Times]![Start]) AND
((DateValue(Times.[End]))=[Forms]![Times]![End]))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End]
WHERE [Start] is not null and [End] is not null;

--
Daryl S


"relativehunter" wrote:


The message specifically is "The expression is typed incorrectly, or it is
too complex to be evaluated." And gives an example.

The query is: SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((DateValue([Start]))=DateValue([Forms]![Times]![Start])) AND
((DateValue([End]))=DateValue([Forms]![Times]![End])))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End];
I have a form to select the beginning and ending dates.

  #7  
Old May 27th, 2010, 09:26 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Error 2950

Relativehunter -

Can your Start or End values in the table be null? If so, you need to
address that. I assume if they are null, then you don't have a Total time
for those records, and they should be exluded (see the WHERE clause below).

Also, I assume the form's Start and End fields are true dates. If your
table Start and End fields are true date/time fields, then simplify the query:

SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((Times.[Start])=[Forms]![Times]![Start]) AND
((DateValue(Times.[End]))=[Forms]![Times]![End]))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End]
WHERE [Start] is not null and [End] is not null;

--
Daryl S


"relativehunter" wrote:


The message specifically is "The expression is typed incorrectly, or it is
too complex to be evaluated." And gives an example.

The query is: SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((DateValue([Start]))=DateValue([Forms]![Times]![Start])) AND
((DateValue([End]))=DateValue([Forms]![Times]![End])))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End];
I have a form to select the beginning and ending dates.

  #8  
Old May 27th, 2010, 09:45 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Error 2950

Relativehunter -

You talk about the Paper form, but your query uses data from the Times form.
Could this be your problem?

Should [Forms]![Times]![Start] be [Forms]![Paper]![Start], etc.?

--
Daryl S


"relativehunter" wrote:

I changed the update query to fill in the same time in both begin and end, so
that end had a non-null time. Got the same exact message. Simplifying the
query does not seem to be necessary, since when the Paper form is not open,
the query runs fine. Seems to be some kind of interaction between the two
open objects.

"Daryl S" wrote:

Relativehunter -

Can your Start or End values in the table be null? If so, you need to
address that. I assume if they are null, then you don't have a Total time
for those records, and they should be exluded (see the WHERE clause below).

Also, I assume the form's Start and End fields are true dates. If your
table Start and End fields are true date/time fields, then simplify the query:

SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((Times.[Start])=[Forms]![Times]![Start]) AND
((DateValue(Times.[End]))=[Forms]![Times]![End]))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End]
WHERE [Start] is not null and [End] is not null;

--
Daryl S


"relativehunter" wrote:


The message specifically is "The expression is typed incorrectly, or it is
too complex to be evaluated." And gives an example.

The query is: SELECT Sum(Times.[Total time]) AS [Sum Of Total time],
[Forms]![Times]![Start] AS Start, [Forms]![Times]![End] AS [End]
FROM Times
WHERE (((DateValue([Start]))=DateValue([Forms]![Times]![Start])) AND
((DateValue([End]))=DateValue([Forms]![Times]![End])))
GROUP BY [Forms]![Times]![Start], [Forms]![Times]![End];
I have a form to select the beginning and ending dates.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.