birthdate fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to access and am working with an existing form that has 2 fields one
for a birthday and another for a spouses birthday. The problem is that the
date entered in one will show up in both no matter which field you enter a
date into it chages the date in both fields.

help the newbie please
mike_e_ebermed
 
You're going to have to post the code you are using or explain your setup for
anyone to be able to help you.
 
it is a data base that is a directory for our church. in design view their
are 2 fieleds that display birthdates. One of the name of the first person
in the field and one for a spouses birthday. What or how do provide the
information that is needed?
 
I am new to access and am working with an existing form that has 2 fields one
for a birthday and another for a spouses birthday. The problem is that the
date entered in one will show up in both no matter which field you enter a
date into it chages the date in both fields.

The first thing to realize is that Forms don't have fields, and that Forms
don't store data. A Form is *just a window* - a tool to manage data which is
stored in a Table.

A control (such as the textboxes that you have on the form for birthdates) has
a Control Source property, which specifies which field in the Table that
control displays. It sounds like you have *one* Birthdate field in your table,
with two textboxes (one labeled for the person, the other labeled for the
spouse), but they're both bound to the same field. It's like looking through
two different windows at something - it's the same date, no matter which
window you look through!

If you open the Form in design view, you can look at the Control Source
property of each of these textboxes. What's that property? You can also look
at the Form's properties, and find the Record Source property - that should be
the table or perhaps the query upon which the form is based (that's where the
data is actually stored). Click the ... icon by that property, and you should
get a query design window (maybe with a prompt); select View... SQL from the
menu, and copy and paste the text that you'll see to a message here.

John W. Vinson [MVP]
 
the control source for both text boxes is "birthdate"

this is the text in sql view for the spouse birthday text box "SELECT
FROM [Members Address];"

I hope that I got what you asked me to. Your instruction and explianation
were clear. thank you
 
I am not sure how I got there but I found an Expresion Builder and built an
expression that matched text box for "spouse birthdate" and now it shows it
as the source controler. And the problem seems to be resolved. I hope that
I have not created another one when it comes time to retrieve data in a
report. But I will cross that bridge when I come to it.
 
the control source for both text boxes is "birthdate"

Then both textboxes will show the same value - the value of the field
[birthdate] in your table.

this is the text in sql view for the spouse birthday text box "SELECT
FROM [Members Address];"

I hope it doesn't, because that is an invalid SQL string! Surely it's
something like "SELECT * FROM [Members Address];" where the * means all
fields?
I hope that I got what you asked me to. Your instruction and explianation
were clear. thank you

If you want separate values for the person's birthdate and the spouse's
birthdate then you must have separate fields in the table.

However, since a spouse is a person too, I'd really suggest having a separate
record for the spouse. It may depend on the specific needs of your database,
which I don't know!

John W. Vinson [MVP]
 
I have been reading a tutorial in ms>office>access2003>tutorials and it is
starting to make a little sense. Each table has records that have fields.
In the database members_addresses there is currently one table that has
multiple records with identical fields that have data specific to each
record. In each record in the table there is a field both for birthdate and
spouse birthdate. If I am correct in understanding what you have told me the
problem was that both fields although different in name had the same source
controler. I beleive that that was corrected when I created a expression
specific to the spouse birthdate field. How am I doing so far?

John W. Vinson said:
the control source for both text boxes is "birthdate"

Then both textboxes will show the same value - the value of the field
[birthdate] in your table.

this is the text in sql view for the spouse birthday text box "SELECT
FROM [Members Address];"

I hope it doesn't, because that is an invalid SQL string! Surely it's
something like "SELECT * FROM [Members Address];" where the * means all
fields?
I hope that I got what you asked me to. Your instruction and explianation
were clear. thank you

If you want separate values for the person's birthdate and the spouse's
birthdate then you must have separate fields in the table.

However, since a spouse is a person too, I'd really suggest having a separate
record for the spouse. It may depend on the specific needs of your database,
which I don't know!

John W. Vinson [MVP]
 
I have been reading a tutorial in ms>office>access2003>tutorials and it is
starting to make a little sense. Each table has records that have fields.
In the database members_addresses there is currently one table that has
multiple records with identical fields that have data specific to each
record. In each record in the table there is a field both for birthdate and
spouse birthdate. If I am correct in understanding what you have told me the
problem was that both fields although different in name had the same source
controler. I beleive that that was corrected when I created a expression
specific to the spouse birthdate field. How am I doing so far?

Sounds like you're getting there!

One important concept: Fields in tables have values; Controls on forms display
those values and let you edit them.

You need (and apparently have) two fields in your table for the two
birthdates. Now you need two controls on the form, one of them bound to each
field. The "binding" is done using the Control Source property of the form
control - it is the name of the field containing the data which the control
displays.

John W. Vinson [MVP]
 
John, In the thread "unbound fields" you mentioned tutorials on "jeff's
site". Can you post links to those tutorials?

thanks for all you help

mike_e_ebermed
 
Back
Top