PC Review


Reply
Thread Tools Rate Thread

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

 
 
thread
Guest
Posts: n/a
 
      27th Feb 2007
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

 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      27th Feb 2007
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."
..

"thread" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
thread
Guest
Posts: n/a
 
      27th Feb 2007
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,
> 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."
> .
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >


 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      27th Feb 2007
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."


"thread" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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,
> 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."
> .
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >



 
Reply With Quote
 
thread
Guest
Posts: n/a
 
      28th Feb 2007
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,
> 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."
>
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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,
> > 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 fieldsuch 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."
> > .
> >
> > "thread" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >


 
Reply With Quote
 
thread
Guest
Posts: n/a
 
      28th Feb 2007
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,
> 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."
>
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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,
> > 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 fieldsuch 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."
> > .
> >
> > "thread" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >


 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      28th Feb 2007
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."

"thread" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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,
> 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."
>
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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,
> > 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."
> > .
> >
> > "thread" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >



 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      28th Feb 2007

"thread" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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,
> 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."
>
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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,
> > 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."
> > .
> >
> > "thread" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >



 
Reply With Quote
 
Al Campagna
Guest
Posts: n/a
 
      28th Feb 2007
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."

"thread" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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,
> 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."
>
>
> "thread" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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,
> > 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."
> > .
> >
> > "thread" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a query or table to field list to use as control source =?Utf-8?B?RkxCaWxsMDQyMA==?= Microsoft Access Getting Started 3 13th Nov 2006 10:58 PM
Adding List Item Value jason Microsoft ASP .NET 3 12th Apr 2005 05:26 PM
Adding attribute for each item in a checkbox list control vikram Microsoft ASP .NET 3 12th Apr 2005 03:09 PM
refreshing field list after adding fields to a table =?Utf-8?B?Q29sb3JhZG8=?= Microsoft Access 5 28th Oct 2004 09:36 PM
Re: Adding file list to list or combo control Michael Daly Microsoft Access Form Coding 0 2nd Sep 2003 07:28 AM


Features
 

Advertising
 

Newsgroups
 


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