adding another item to a list of fields coming from a table inside of a list control

  • Thread starter Thread starter thread
  • Start date Start date
T

thread

hi all
is it possible to add additional field to the list of fields coming
from a table inside of list control,
i see that inside of a row source you can get an sql sentence if you
choose table\query but how i can add additionaly an item that doesnt
appears
for example
list of country coming from a table+additional option that will come
seperatly(not part of the country list) but will come as one of the
item list
 
thread,
Not sure what you mean, but...
If you use a query as the RowSource for the List control, fields from "related" tables
can be linked to the original table, and added to the fields the query delivers.
Also, using a query allows calculated fields to be added...
ex. If a query delivers Price and Qty fields, a calculated field such as LineTotal
: Price * Qty can be added to the query, and displayed in the listbox.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
..
 
Hi Capagna,
i accually meant to this issue
if you have list of countries coming from a query and beside this you
want to had another item that is called"all countries" just to make a
globl pick-up to all the countries or just to take out filter this is
the reason i want to add additional item
do you think its posibble?
for example:
the countries that i have in the query are
germany,india and mexico and i want to add additional option call alll
countries

Al Campagna כתב:
 
thread,
You can do that by leaving the cboCountry Null.
Let's say you were selecting a Country from a combo (cboCountry) on a form
(frmYourFormName) for a report.
In the query behind the report you could set the criteria for your Country field to...
Like "*" & Forms!frmYourFormName!cboCountry & "*"
In effect, this says "If cboCountry is Null, report on ALL Countries... otherwise use
the selected value of cboCountry as a filter."
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


Hi Capagna,
i accually meant to this issue
if you have list of countries coming from a query and beside this you
want to had another item that is called"all countries" just to make a
globl pick-up to all the countries or just to take out filter this is
the reason i want to add additional item
do you think its posibble?
for example:
the countries that i have in the query are
germany,india and mexico and i want to add additional option call alll
countries

Al Campagna ???:
 
Hi Campagna,

the issue is that on list control,you have an option to choose more
then 1 item so its little bit problematic to have criteria but maybe i
have wrong aproach
i need to have the option of "all countries" appearing on the list as
one of the option regarding the behaid the seen its doesnt matter
Al Campagna כתב:
 
Hi Campagna,

the issue is that on list control,you have an option to choose more
then 1 item so its little bit problematic to have criteria but maybe i
have wrong aproach
i need to have the option of "all countries" appearing on the list as
one of the option regarding the behaid the seen its doesnt matter
Al Campagna כתב:
 
thread,
I have to go out for a while, so I can't get too specific right now, but...
You should be able to determine if any items have been selected from the list or not.
(Count of Items Selected?) If not, open the report with all Countries showing.
I'll get back ASAP...
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Hi Campagna,

the issue is that on list control,you have an option to choose more
then 1 item so its little bit problematic to have criteria but maybe i
have wrong aproach
i need to have the option of "all countries" appearing on the list as
one of the option regarding the behaid the seen its doesnt matter
Al Campagna ???:
 
Hi Campagna,

the issue is that on list control,you have an option to choose more
then 1 item so its little bit problematic to have criteria but maybe i
have wrong aproach
i need to have the option of "all countries" appearing on the list as
one of the option regarding the behaid the seen its doesnt matter
Al Campagna ???:
 
thread,
May have sent a blank response... please disregard it.
Not sure if I understand for sure but...
Using the AfterUpdate event of the list... or some button Click, etc...
If lstYourListName.ItemsSelected.Count = 0 Then
'then do some operation
Else
'do some other operation
End If
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Hi Campagna,

the issue is that on list control,you have an option to choose more
then 1 item so its little bit problematic to have criteria but maybe i
have wrong aproach
i need to have the option of "all countries" appearing on the list as
one of the option regarding the behaid the seen its doesnt matter
Al Campagna ???:
 
Back
Top