Making Subform table's field 1 same for all records in Form, but..

G

Guest

I have two tables I've based a form on. The first one if for cat breeds and
general information. The second one is for when I calculate the number of
cats in that breed (for a game) and the date it was calculated. I want the
date to be the same for all the cats, but the numbers to be different. Here's
a general idea as to what the tables look like:
Table 1 [Breeds]:
Breed Breed origin Date Introduced Standards
-------- ----------------- ---------------------
--------------
Abyssinian Real Breed n/a (rest not important)
American Bobtail Player Created Mar. 24, 2006

Table 2 [Numbers]:
Date Recorded Breed Number
------------------- ---------- -----------
Nov. 14, 2005 Abyssinian n/a
Nov. 29, 2005 Abyssinian 256
Dec. 02, 2005 Abyssinian 259
Dec. 10, 2005 Abyssinian 266
Dec. 20, 2005 Abyssinian n/a
Dec. 31, 2005 Abyssinian n/a
Jan. 16, 2006 Abyssinian 264

The related field is obviously the Breed field, but not ALL the dates will
have information in them. What I want is when I update it, to only have to
type in the date once, and have it show for all the breed records. But how do
I do that without it putting the same number in for all the records?

Sincerely,
Stoffelees
 
V

Vincent Johns

Stoffelees,

What is it that you want to see? I assume that your desired output will
contain records containing something like this (I bobbed the tails of a
couple of fields to make the line fit):

Date Recorded Breed Number Breed origin Introduced ...
------------- ---------- ------ ------------ ----------
Nov. 14, 2005 Abyssinian n/a Real Breed n/a
Nov. 29, 2005 Abyssinian 256 Real Breed n/a
...
Mar. 29, 2006 American B 185 Player Creat Mar. 24, 2006
...

If that's what you want, just have your Query link the two Tables on
their [Breed] fields, and select the fields you want to see. The [Date
Introduced] will be the same for all records linking to that breed.

If you want to do something else, posting an example record would help.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
G

Guest

Not exactly, I guess I gave to much information this time. What the problem
is that record the numbers for all the breeds on one day. Here's a link to a
picture that might make things clearer:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord.jpg

What is causing me the problem is the subform. Each one has the same date,
but only if I enter it in. I want to only have to enter in each date once and
have it display for every breed, without changing the number next to the
date. Here's what the table looks like:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord2.jpg

Is there some sort of query or another table I should make to do this?

~Stoffelees


Vincent Johns said:
Stoffelees,

What is it that you want to see? I assume that your desired output will
contain records containing something like this (I bobbed the tails of a
couple of fields to make the line fit):

Date Recorded Breed Number Breed origin Introduced ...
------------- ---------- ------ ------------ ----------
Nov. 14, 2005 Abyssinian n/a Real Breed n/a
Nov. 29, 2005 Abyssinian 256 Real Breed n/a
...
Mar. 29, 2006 American B 185 Player Creat Mar. 24, 2006
...

If that's what you want, just have your Query link the two Tables on
their [Breed] fields, and select the fields you want to see. The [Date
Introduced] will be the same for all records linking to that breed.

If you want to do something else, posting an example record would help.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.

I have two tables I've based a form on. The first one if for cat breeds and
general information. The second one is for when I calculate the number of
cats in that breed (for a game) and the date it was calculated. I want the
date to be the same for all the cats, but the numbers to be different. Here's
a general idea as to what the tables look like:
Table 1 [Breeds]:
Breed Breed origin Date Introduced Standards
-------- ----------------- ---------------------
--------------
Abyssinian Real Breed n/a (rest not important)
American Bobtail Player Created Mar. 24, 2006

Table 2 [Numbers]:
Date Recorded Breed Number
------------------- ---------- -----------
Nov. 14, 2005 Abyssinian n/a
Nov. 29, 2005 Abyssinian 256
Dec. 02, 2005 Abyssinian 259
Dec. 10, 2005 Abyssinian 266
Dec. 20, 2005 Abyssinian n/a
Dec. 31, 2005 Abyssinian n/a
Jan. 16, 2006 Abyssinian 264

The related field is obviously the Breed field, but not ALL the dates will
have information in them. What I want is when I update it, to only have to
type in the date once, and have it show for all the breed records. But how do
I do that without it putting the same number in for all the records?

Sincerely,
Stoffelees
 
V

Vincent Johns

Stoffelees,

OK, what I think you're asking for is to be able to enter several
records in which the date stays the same (so you don't have to keep
re-entering it), as you enter the records. Is this correct? (I could
just barely read the JPEG images -- resolution was kind of marginal --
but I could see that more than one date was recorded for some breeds.)

I can think of a couple of approaches. For example, suppose you
want to be able to set the default values for a couple of fields when
you're entering them into the subform. You could have a control (such
as a Combo Box or Text Box) on the Form in which you preset the date,
and add some code to your subform to copy that value into the [Date
Recorded] field of each new record before you enter anything manually.
Is this close to what you'd want? Or, instead of a control on the Form,
you could set up a Table in which you could enter the constant values,
and get the default values from that Table.

If the value of [Date Recorded] is always, or usually, the current
date, you could avoid the problem completely just by setting the field's
value to Now() or to Int(Now()) instead of entering it from the subform,
and you could edit any exceptions manually.

If you don't need to have everything automated, with minimal typing
you can accomplish something similar; after entering a record with the
date you want to use, when you enter the following record,
control-apostrophe (single quotation mark) will copy the previous value
of that field. So, after the first record in the subform for a breed,
you might type control-apostrophe, tab, [number], tab,
control-apostrophe, tab, [number], tab, etc. That would give you
several records with the same date. But your example Table showed lots
of different dates. Were you saying that that's what you want to see
there, or rather that it's what you have, but you'd prefer to have all
the same date?

If you already have the list of numbers in (for example) a text file
instead of written in pencil on a piece of paper, you could copy those
to Notepad, one number per line, select (e.g.) 6 of them, then in Access
select the [Number] field in 6 consecutive records, and paste the copied
numbers there. You'd get a dialog box asking if you want to replace
those records; click on yes. (Actually, you'd just be replacing that
field in those records.) You could do the same with dates, replacing
several at a time.

Another possibility, for simplifying the data-entry process (and
with minimal effort), is to use Excel to enter the data, then import the
list into your database. Excel can do auto-completion (e.g., type "Ab"
and get "Abyssinian"), and can allow you to sort and filter your list
(if you turn on Autofilter for your list) while you're entering it. In
Access, you could then just import these data into your Tables, and the
importation process can be automated. This would let you enter data for
several breeds, in any order, whereas with your Form you'd need to
select the record for a breed before entering the numbers for the cats
of that breed. The control-apostrophe trick works in Excel as well,
though in Excel you can instead make 100 copies of a date, if you wish,
just by copying the cell containing the desired date and pasting it into
a selected range (something that doesn't work in an Access subform).

I hope that at least one of these suggestions will be useful. Good
luck.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
Not exactly, I guess I gave to much information this time. What the problem
is that record the numbers for all the breeds on one day. Here's a link to a
picture that might make things clearer:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord.jpg

What is causing me the problem is the subform. Each one has the same date,
but only if I enter it in. I want to only have to enter in each date once and
have it display for every breed, without changing the number next to the
date. Here's what the table looks like:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord2.jpg

Is there some sort of query or another table I should make to do this?

~Stoffelees


:

Stoffelees,

What is it that you want to see? I assume that your desired output will
contain records containing something like this (I bobbed the tails of a
couple of fields to make the line fit):

Date Recorded Breed Number Breed origin Introduced ...
------------- ---------- ------ ------------ ----------
Nov. 14, 2005 Abyssinian n/a Real Breed n/a
Nov. 29, 2005 Abyssinian 256 Real Breed n/a
...
Mar. 29, 2006 American B 185 Player Creat Mar. 24, 2006
...

If that's what you want, just have your Query link the two Tables on
their [Breed] fields, and select the fields you want to see. The [Date
Introduced] will be the same for all records linking to that breed.

If you want to do something else, posting an example record would help.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.


Stoffelees wrote:

I have two tables I've based a form on. The first one if for cat breeds and
general information. The second one is for when I calculate the number of
cats in that breed (for a game) and the date it was calculated. I want the
date to be the same for all the cats, but the numbers to be different. Here's
a general idea as to what the tables look like:
Table 1 [Breeds]:
Breed Breed origin Date Introduced Standards
-------- ----------------- ---------------------
--------------
Abyssinian Real Breed n/a (rest not important)
American Bobtail Player Created Mar. 24, 2006

Table 2 [Numbers]:
Date Recorded Breed Number
------------------- ---------- -----------
Nov. 14, 2005 Abyssinian n/a
Nov. 29, 2005 Abyssinian 256
Dec. 02, 2005 Abyssinian 259
Dec. 10, 2005 Abyssinian 266
Dec. 20, 2005 Abyssinian n/a
Dec. 31, 2005 Abyssinian n/a
Jan. 16, 2006 Abyssinian 264

The related field is obviously the Breed field, but not ALL the dates will
have information in them. What I want is when I update it, to only have to
type in the date once, and have it show for all the breed records. But how do
I do that without it putting the same number in for all the records?

Sincerely,
Stoffelees
 
G

Guest

I guess basically I want to have the same dates displayed for every subform,
but every number next to them for each breed will be different. The setting
up a table to get the constant values from sounds like the one I want. But
will I only have to type in the dates once and then it will use that to put
the dates in for each breed? Like I said, my worries are having to either
type in each date for each breed or not knowing how to link the tables/forms.
I tried getting the table that has the date, breed, and number in it to get
the date information from another table, but then I also don't want to have
to choose from a drop box each time. I just want it inserted automatically.
Is there anyway I can do that? I guess I'm just confused as to what to do.

:

Stoffelees,

OK, what I think you're asking for is to be able to enter several
records in which the date stays the same (so you don't have to keep
re-entering it), as you enter the records. Is this correct? (I could just
barely read the JPEG images -- resolution was kind of marginal -- but I could
see that more than one date was recorded for some breeds.)

I can think of a couple of approaches. For example, suppose you want to
be able to set the default values for a couple of fields when you're entering
them into the subform. You could have a control (such as a Combo Box or Text
Box) on the Form in which you preset the date, and add some code to your
subform to copy that value into the [Date Recorded] field of each new record
before you enter anything manually. Is this close to what you'd want? Or,
instead of a control on the Form, you could set up a Table in which you could
enter the constant values, and get the default values from that Table.

If the value of [Date Recorded] is always, or usually, the current date,
you could avoid the problem completely just by setting the field's value to
Now() or to Int(Now()) instead of entering it from the subform, and you could
edit any exceptions manually.

If you don't need to have everything automated, with minimal typing you
can accomplish something similar; after entering a record with the date you
want to use, when you enter the following record, control-apostrophe (single
quotation mark) will copy the previous value of that field. So, after the
first record in the subform for a breed, you might type control-apostrophe,
tab, [number], tab, control-apostrophe, tab, [number], tab, etc. That would
give you several records with the same date. But your example Table showed
lots of different dates. Were you saying that that's what you want to see
there, or rather that it's what you have, but you'd prefer to have all the
same date?

If you already have the list of numbers in (for example) a text file
instead of written in pencil on a piece of paper, you could copy those to
Notepad, one number per line, select (e.g.) 6 of them, then in Access select
the [Number] field in 6 consecutive records, and paste the copied numbers
there. You'd get a dialog box asking if you want to replace those records;
click on yes. (Actually, you'd just be replacing that field in those
records.) You could do the same with dates, replacing several at a time.

Another possibility, for simplifying the data-entry process (and with
minimal effort), is to use Excel to enter the data, then import the list into
your database. Excel can do auto-completion (e.g., type "Ab" and get
"Abyssinian"), and can allow you to sort and filter your list (if you turn on
Autofilter for your list) while you're entering it. In Access, you could
then just import these data into your Tables, and the importation process can
be automated. This would let you enter data for several breeds, in any
order, whereas with your Form you'd need to select the record for a breed
before entering the numbers for the cats of that breed. The
control-apostrophe trick works in Excel as well, though in Excel you can
instead make 100 copies of a date, if you wish, just by copying the cell
containing the desired date and pasting it into a selected range (something
that doesn't work in an Access subform).

I hope that at least one of these suggestions will be useful. Good luck.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.

Stoffelees wrote:
Not exactly, I guess I gave to much information this time. What the problem
is that record the numbers for all the breeds on one day. Here's a link to a
picture that might make things clearer:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord.jpg

What is causing me the problem is the subform. Each one has the same date,
but only if I enter it in. I want to only have to enter in each date once and
have it display for every breed, without changing the number next to the
date. Here's what the table looks like:

http://i3.photobucket.com/albums/y92/EliKitty17/PFBreedNumbersRecord2.jpg

Is there some sort of query or another table I should make to do this?

~Stoffelees



:


Stoffelees,

What is it that you want to see? I assume that your desired output will
contain records containing something like this (I bobbed the tails of a
couple of fields to make the line fit):

Date Recorded Breed Number Breed origin Introduced ...
------------- ---------- ------ ------------ ----------
Nov. 14, 2005 Abyssinian n/a Real Breed n/a
Nov. 29, 2005 Abyssinian 256 Real Breed n/a
...
Mar. 29, 2006 American B 185 Player Creat Mar. 24, 2006
...

If that's what you want, just have your Query link the two Tables on their
[Breed] fields, and select the fields you want to see. The [Date Introduced]
will be the same for all records linking to that breed.

If you want to do something else, posting an example record would help.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.


Stoffelees wrote:

I have two tables I've based a form on. The first one if for cat breeds and
general information. The second one is for when I calculate the number of
cats in that breed (for a game) and the date it was calculated. I want the
date to be the same for all the cats, but the numbers to be different. Here's
a general idea as to what the tables look like:
Table 1 [Breeds]:
Breed Breed origin Date Introduced Standards
-------- ----------------- ---------------------
--------------
Abyssinian Real Breed n/a (rest not important)
American Bobtail Player Created Mar. 24, 2006

Table 2 [Numbers]:
Date Recorded Breed Number
------------------- ---------- -----------
Nov. 14, 2005 Abyssinian n/a
Nov. 29, 2005 Abyssinian 256
Dec. 02, 2005 Abyssinian 259
Dec. 10, 2005 Abyssinian 266
Dec. 20, 2005 Abyssinian n/a
Dec. 31, 2005 Abyssinian n/a
Jan. 16, 2006 Abyssinian 264

The related field is obviously the Breed field, but not ALL the dates will
have information in them. What I want is when I update it, to only have to
type in the date once, and have it show for all the breed records. But how do
I do that without it putting the same number in for all the records?

Sincerely,
Stoffelees
 
G

Guest

I thought of something that may basically clear up what I'm trying to do.
Everyone learns in school of a problem like: you have 2 types of candy and 3
types of drinks, how many combinations of candy and drinks can you make?

So I have 15 or so different dates that I want all 15 applied to the 163
different breeds, without having to type it all up. I want to be able to add
one record to the dates and have it automatically add it to each breed. I
tried making a table for dates, breeds and numbers separately and then
combining it in a separate table with an update query, but that didn't work.

I'm really confused as to what I need to do. I'm still fiddling around with
it, but some more of your good advice would be appreciated.

~Stoffelees
 

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