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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Control Source Expression is too Complex



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2008, 07:59 PM posted to microsoft.public.access.forms
Jim Johnson[_2_]
external usenet poster
 
Posts: 2
Default Control Source Expression is too Complex

I am using =Choose() command to display only current users of my database.
This allows me to limit the drop-down list of current users only while
keeping the records of past users intact. This has worked well, until now.

Apparently, there is a limit to the number of values for the "choose"
expression. When I tried to had the name of a new employee to my expression
in the control source, I got the following error:

"The expression you entered is too complex."

Can someone please help me to simplify the expression? It is simply
=Choose([Requestor],"Name1","Name2",..."Name27","Name28"). Once I add the
29th name and tab to the next field, I get the above error. Thanks in
advance.
  #2  
Old April 14th, 2008, 09:09 PM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default Control Source Expression is too Complex

Why not just base the combo's rowsource on a query and, you should have a
boolean field in your employees table to mark an employee as InActive. So
your query could pull

Select tblEmployees.EmployeeID, tblEmployees.EmployeeName FROM tblEmployees
Where tblEmployees.InActive = False

No choose or typing in employees all the time is necessary. Just add them
to the table and they are there. If they leave check the InActive box and
they disappear from the combo.

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"Jim Johnson" wrote:

I am using =Choose() command to display only current users of my database.
This allows me to limit the drop-down list of current users only while
keeping the records of past users intact. This has worked well, until now.

Apparently, there is a limit to the number of values for the "choose"
expression. When I tried to had the name of a new employee to my expression
in the control source, I got the following error:

"The expression you entered is too complex."

Can someone please help me to simplify the expression? It is simply
=Choose([Requestor],"Name1","Name2",..."Name27","Name28"). Once I add the
29th name and tab to the next field, I get the above error. Thanks in
advance.

  #3  
Old April 15th, 2008, 09:05 PM posted to microsoft.public.access.forms
Jim Johnson[_2_]
external usenet poster
 
Posts: 2
Default Control Source Expression is too Complex

Hi Bob,

I was able to create the select query but I'm not quite sure how to pull the
RequestorName into the control. Can you please help me with what to put in
the control source for this field? I have pasted the SQL of the query below.

SELECT tblRequestor.RequestorName, tblRequestor.Function, tblRequestor.Active
FROM tblRequestor
WHERE (((tblRequestor.Active)=True))
ORDER BY tblRequestor.RequestorID;

Thank you for your assistance,
Jim


"boblarson" wrote:

Why not just base the combo's rowsource on a query and, you should have a
boolean field in your employees table to mark an employee as InActive. So
your query could pull

Select tblEmployees.EmployeeID, tblEmployees.EmployeeName FROM tblEmployees
Where tblEmployees.InActive = False

No choose or typing in employees all the time is necessary. Just add them
to the table and they are there. If they leave check the InActive box and
they disappear from the combo.

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"Jim Johnson" wrote:

I am using =Choose() command to display only current users of my database.
This allows me to limit the drop-down list of current users only while
keeping the records of past users intact. This has worked well, until now.

Apparently, there is a limit to the number of values for the "choose"
expression. When I tried to had the name of a new employee to my expression
in the control source, I got the following error:

"The expression you entered is too complex."

Can someone please help me to simplify the expression? It is simply
=Choose([Requestor],"Name1","Name2",..."Name27","Name28"). Once I add the
29th name and tab to the next field, I get the above error. Thanks in
advance.

  #4  
Old April 16th, 2008, 04:16 AM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default Control Source Expression is too Complex

That select statement should be in the combo box's ROW SOURCE property.
Then, you bind that combo box's RECORD source to the ID field on your form.

If you aren't sure about how the combo works, check out the samples on my
website (see below).
--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"Jim Johnson" wrote:

Hi Bob,

I was able to create the select query but I'm not quite sure how to pull the
RequestorName into the control. Can you please help me with what to put in
the control source for this field? I have pasted the SQL of the query below.

SELECT tblRequestor.RequestorName, tblRequestor.Function, tblRequestor.Active
FROM tblRequestor
WHERE (((tblRequestor.Active)=True))
ORDER BY tblRequestor.RequestorID;

Thank you for your assistance,
Jim


"boblarson" wrote:

Why not just base the combo's rowsource on a query and, you should have a
boolean field in your employees table to mark an employee as InActive. So
your query could pull

Select tblEmployees.EmployeeID, tblEmployees.EmployeeName FROM tblEmployees
Where tblEmployees.InActive = False

No choose or typing in employees all the time is necessary. Just add them
to the table and they are there. If they leave check the InActive box and
they disappear from the combo.

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"Jim Johnson" wrote:

I am using =Choose() command to display only current users of my database.
This allows me to limit the drop-down list of current users only while
keeping the records of past users intact. This has worked well, until now.

Apparently, there is a limit to the number of values for the "choose"
expression. When I tried to had the name of a new employee to my expression
in the control source, I got the following error:

"The expression you entered is too complex."

Can someone please help me to simplify the expression? It is simply
=Choose([Requestor],"Name1","Name2",..."Name27","Name28"). Once I add the
29th name and tab to the next field, I get the above error. Thanks in
advance.

  #5  
Old April 16th, 2008, 04:24 AM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Control Source Expression is too Complex

"boblarson" wrote in message
...

Then, you bind that combo box's RECORD source to the ID field on your
form.


I think you mean CONTROL source.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

  #6  
Old April 16th, 2008, 05:57 AM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default Control Source Expression is too Complex

Yep, - control source (tongue got tangled up there for a moment)
--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"Dirk Goldgar" wrote:

"boblarson" wrote in message
...

Then, you bind that combo box's RECORD source to the ID field on your
form.


I think you mean CONTROL source.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 




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 03:52 PM.


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