How do I automatically populate a field in Access?

T

TedChicago

I have a membership data base. Elections are coming up. I want to create a
field "Eligible" in a Election Roster tablewhich will show "Yes" if certain
criteria are met (Member before 01-01-09) and "Active"=Yes I've done the
wuery that will generate this table, but I want the column "Eligible" to be
automatically marked "Yes"
 
S

SuzyQ

That will only work for new records added, it doesn't change existing records.

Do you want to default to Yes when user adds new data, but then allow the
field to be changed to No regardless of the criteria, or do you want the
eligible field to remain yes as long as criteria is met. If the latter,
don't add a field, it's not necessary. In a query include the field like
this in the query builder Eligible:iif([active] = true and [memberBefore] <=
#01/01/2009#, true,false)

If the former and you need to add the field and then populate it after the
fact. Use an update query based on the conditions you stated.
 
T

TedChicago

Thanks for your reply. I'm doing the latter. I'm a novice, so could someone
please take me through this step-by step.
--
Ted in Chicago


SuzyQ said:
That will only work for new records added, it doesn't change existing records.

Do you want to default to Yes when user adds new data, but then allow the
field to be changed to No regardless of the criteria, or do you want the
eligible field to remain yes as long as criteria is met. If the latter,
don't add a field, it's not necessary. In a query include the field like
this in the query builder Eligible:iif([active] = true and [memberBefore] <=
#01/01/2009#, true,false)

If the former and you need to add the field and then populate it after the
fact. Use an update query based on the conditions you stated.



NAS said:
Set the default value of the field to "yes" in the table.
 
T

TedChicago

Where do I find this response?
--
Ted in Chicago


Steve said:
My response gives you a step by step procedsure.


TedChicago said:
Thanks for your reply. I'm doing the latter. I'm a novice, so could
someone
please take me through this step-by step.
--
Ted in Chicago


SuzyQ said:
That will only work for new records added, it doesn't change existing
records.

Do you want to default to Yes when user adds new data, but then allow the
field to be changed to No regardless of the criteria, or do you want the
eligible field to remain yes as long as criteria is met. If the latter,
don't add a field, it's not necessary. In a query include the field like
this in the query builder Eligible:iif([active] = true and [memberBefore]
<=
#01/01/2009#, true,false)

If the former and you need to add the field and then populate it after
the
fact. Use an update query based on the conditions you stated.



:

Set the default value of the field to "yes" in the table.

:

I have a membership data base. Elections are coming up. I want to
create a
field "Eligible" in a Election Roster tablewhich will show "Yes" if
certain
criteria are met (Member before 01-01-09) and "Active"=Yes I've done
the
wuery that will generate this table, but I want the column "Eligible"
to be
automatically marked "Yes"
 
G

Gina Whipp

TedChicago,

Isn't this is it?

Eligible: iif([active] = true and [memberBefore] <= #01/01/2009#,
true,false)

Just make sure those are the correct field names and then copy/paste the
above in a new column in your query grid window.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

TedChicago said:
Where do I find this response?
--
Ted in Chicago


Steve said:
My response gives you a step by step procedsure.


TedChicago said:
Thanks for your reply. I'm doing the latter. I'm a novice, so could
someone
please take me through this step-by step.
--
Ted in Chicago


:

That will only work for new records added, it doesn't change existing
records.

Do you want to default to Yes when user adds new data, but then allow
the
field to be changed to No regardless of the criteria, or do you want
the
eligible field to remain yes as long as criteria is met. If the
latter,
don't add a field, it's not necessary. In a query include the field
like
this in the query builder Eligible:iif([active] = true and
[memberBefore]
<=
#01/01/2009#, true,false)

If the former and you need to add the field and then populate it after
the
fact. Use an update query based on the conditions you stated.



:

Set the default value of the field to "yes" in the table.

:

I have a membership data base. Elections are coming up. I want to
create a
field "Eligible" in a Election Roster tablewhich will show "Yes"
if
certain
criteria are met (Member before 01-01-09) and "Active"=Yes I've
done
the
wuery that will generate this table, but I want the column
"Eligible"
to be
automatically marked "Yes"
 
T

TedChicago

Sorry, maybe I'm missing something, but the first response in this thread is
from NAS. The first response from you is to read your response.
--
Ted in Chicago


Steve said:
It's the first response in this thread.

Steve


TedChicago said:
Where do I find this response?
--
Ted in Chicago


Steve said:
My response gives you a step by step procedsure.


Thanks for your reply. I'm doing the latter. I'm a novice, so could
someone
please take me through this step-by step.
--
Ted in Chicago


:

That will only work for new records added, it doesn't change existing
records.

Do you want to default to Yes when user adds new data, but then allow
the
field to be changed to No regardless of the criteria, or do you want
the
eligible field to remain yes as long as criteria is met. If the
latter,
don't add a field, it's not necessary. In a query include the field
like
this in the query builder Eligible:iif([active] = true and
[memberBefore]
<=
#01/01/2009#, true,false)

If the former and you need to add the field and then populate it after
the
fact. Use an update query based on the conditions you stated.



:

Set the default value of the field to "yes" in the table.

:

I have a membership data base. Elections are coming up. I want to
create a
field "Eligible" in a Election Roster tablewhich will show "Yes"
if
certain
criteria are met (Member before 01-01-09) and "Active"=Yes I've
done
the
wuery that will generate this table, but I want the column
"Eligible"
to be
automatically marked "Yes"
 
G

Guest

TedChicago said:
I have a membership data base. Elections are coming up. I want to create
a
field "Eligible" in a Election Roster tablewhich will show "Yes" if
certain
criteria are met (Member before 01-01-09) and "Active"=Yes I've done the
wuery that will generate this table, but I want the column "Eligible" to
be
automatically marked "Yes"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top