Adding a value to a query

shabbaranks

Registered User.
Local time
Today, 14:56
Joined
Oct 17, 2011
Messages
300
Hi,

Am I being stupid or is it possible? I have a query which looks up records from a table, now what I would like to do is append the word All Projects to this query - is it possible, and if so how?

Thanks
 
Please give us an example of what would be input and expected output.
 
Please give us an example of what would be input and expected output.


Ok so, Ive got a lookup query which displays all users. What I would like to do is to append either the word None or a - to the query results. I appreciate there are probably other ways or better ways of doing this but I was just curious as to if it was possible.

Thanks
 
"All my friends will go to either Italy or Spain next month."

Does the above make any sense to you? That is how your reply
is to append either the word None or a - to the query results.
sounds to me. Explain what sort of data gets 'None' and what gets '-'?

When you say append you mean another column displaying this information right? Or you wish to UPDATE another field?
 
"All my friends will go to either Italy or Spain next month."

Does the above make any sense to you? That is how your reply
sounds to me. Explain what sort of data gets 'None' and what gets '-'?

When you say append you mean another column displaying this information right? Or you wish to UPDATE another field?

Sorry, yes I understand what your saying. I have changed the way my form works and instead of being lazy I have added a select box and some logic to my sql statement which either looks for the control box or selects from the combo box.

Thanks - and sorry for the random question :)
 
Still unclear, but it sounds like you have solved your problem ! Good for you ! :)
 
Again apologies - what I was originally trying to do was use a combo box to lookup employee names from a table. But what I was also trying to do was add the word all employees to the list of the combo box so the user could either select a single employee from the combo or all employees. But instead Ive used a check box for all employees :)
 
That makes perfect sense now. Phew ! Well now that you have got a solution I do not wish to disturb this. BTW the method you have chosen is much better than it will go with Coding.

If you wanted to add the word "All employees", you first have to set the ComboBox RowSourceType to Value List, manually loop through (using recordset object) the Employee table to get the names of the Employee, then finally add the Value "All employee".

But its still okay ! Good Luck ! :)
 

Users who are viewing this thread

Back
Top Bottom