Field value as default on subform

  • Thread starter Thread starter Saylindara
  • Start date Start date
It sounds like you are saying you want to record the same value in two
different tables (i.e., one table for the main form, another table for the
subform). Why is that? Using a relational database like Access, you
shouldn't need to.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I've got a main form Event with a field Duration showing how long the event
is predicted to last. On the subform I've got attendance details and a field
Duration to show how long the event actually lasted. Most likely it will be
the same amount of time which is why I wanted the default value from the main
form. Is there a better way?
 
So it isn't the same field, it's something like [PredictedDuration] and
[ActualDuration]?

I'm still somewhat puzzled, though. If your main-form/subform construction
is standard, the subform refers to a "many" table, related to the main-form
(the "one" table). I would think that "predicted" and "actual" are both
characteristics of the event, not one related to the event and the other
related to some kind of "child" record.

What are you pointing that subform at?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The same EventName can be attended by many people on different dates at
different locations.

Jeff Boyce said:
So it isn't the same field, it's something like [PredictedDuration] and
[ActualDuration]?

I'm still somewhat puzzled, though. If your main-form/subform construction
is standard, the subform refers to a "many" table, related to the main-form
(the "one" table). I would think that "predicted" and "actual" are both
characteristics of the event, not one related to the event and the other
related to some kind of "child" record.

What are you pointing that subform at?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Saylindara said:
I've got a main form Event with a field Duration showing how long the
event
is predicted to last. On the subform I've got attendance details and a
field
Duration to show how long the event actually lasted. Most likely it will
be
the same amount of time which is why I wanted the default value from the
main
form. Is there a better way?
 
So [ActualDuration] is a characteristic of a specific instance of [Event]?
And most of the time, it is the same as [PredictedDuration]?

If most of the time it's the same, why bother to re-record it, over and over
again? Why not record the [ActualDuration] only when it varies from the
[PredictedDuration]? That way, you could use a query to return the
[ActualDuration] (if it is entered), or the [PredictedDuration] (if it
didn't differ).

JOPO (just one person's opinion)

.... and if you absolutely must have a duplicate(d) value in each sub-form
record, take a look at using the sub-form's BeforeUpdate event to load up
that field. No need to set it as default, just write it before finalizing
the sub-form record.

Regards

Jeff Boyce
Microsoft Office/Access MVP



Saylindara said:
The same EventName can be attended by many people on different dates at
different locations.

Jeff Boyce said:
So it isn't the same field, it's something like [PredictedDuration] and
[ActualDuration]?

I'm still somewhat puzzled, though. If your main-form/subform
construction
is standard, the subform refers to a "many" table, related to the
main-form
(the "one" table). I would think that "predicted" and "actual" are both
characteristics of the event, not one related to the event and the other
related to some kind of "child" record.

What are you pointing that subform at?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Saylindara said:
I've got a main form Event with a field Duration showing how long the
event
is predicted to last. On the subform I've got attendance details and a
field
Duration to show how long the event actually lasted. Most likely it
will
be
the same amount of time which is why I wanted the default value from
the
main
form. Is there a better way?

:

It sounds like you are saying you want to record the same value in two
different tables (i.e., one table for the main form, another table for
the
subform). Why is that? Using a relational database like Access, you
shouldn't need to.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

How can I make a value on a form the default value on a subform?
 
Good point. I'll have to have a rethink.
I've no idea how to use BeforeUpdate should I need it. Where can I get some
help on using these sort of properties?
Thanks for your help.

Jeff Boyce said:
So [ActualDuration] is a characteristic of a specific instance of [Event]?
And most of the time, it is the same as [PredictedDuration]?

If most of the time it's the same, why bother to re-record it, over and over
again? Why not record the [ActualDuration] only when it varies from the
[PredictedDuration]? That way, you could use a query to return the
[ActualDuration] (if it is entered), or the [PredictedDuration] (if it
didn't differ).

JOPO (just one person's opinion)

.... and if you absolutely must have a duplicate(d) value in each sub-form
record, take a look at using the sub-form's BeforeUpdate event to load up
that field. No need to set it as default, just write it before finalizing
the sub-form record.

Regards

Jeff Boyce
Microsoft Office/Access MVP



Saylindara said:
The same EventName can be attended by many people on different dates at
different locations.

Jeff Boyce said:
So it isn't the same field, it's something like [PredictedDuration] and
[ActualDuration]?

I'm still somewhat puzzled, though. If your main-form/subform
construction
is standard, the subform refers to a "many" table, related to the
main-form
(the "one" table). I would think that "predicted" and "actual" are both
characteristics of the event, not one related to the event and the other
related to some kind of "child" record.

What are you pointing that subform at?

Regards

Jeff Boyce
Microsoft Office/Access MVP

I've got a main form Event with a field Duration showing how long the
event
is predicted to last. On the subform I've got attendance details and a
field
Duration to show how long the event actually lasted. Most likely it
will
be
the same amount of time which is why I wanted the default value from
the
main
form. Is there a better way?

:

It sounds like you are saying you want to record the same value in two
different tables (i.e., one table for the main form, another table for
the
subform). Why is that? Using a relational database like Access, you
shouldn't need to.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

How can I make a value on a form the default value on a subform?
 
You'll need to plan to spend some time learning to use the events that
Access forms and reports offer. As a very simple approach, try looking up
BeforeUpdate in Access HELP. Also try using MS Access BeforeUpdate as
search terms on-line.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Saylindara said:
Good point. I'll have to have a rethink.
I've no idea how to use BeforeUpdate should I need it. Where can I get
some
help on using these sort of properties?
Thanks for your help.

Jeff Boyce said:
So [ActualDuration] is a characteristic of a specific instance of
[Event]?
And most of the time, it is the same as [PredictedDuration]?

If most of the time it's the same, why bother to re-record it, over and
over
again? Why not record the [ActualDuration] only when it varies from the
[PredictedDuration]? That way, you could use a query to return the
[ActualDuration] (if it is entered), or the [PredictedDuration] (if it
didn't differ).

JOPO (just one person's opinion)

.... and if you absolutely must have a duplicate(d) value in each
sub-form
record, take a look at using the sub-form's BeforeUpdate event to load up
that field. No need to set it as default, just write it before
finalizing
the sub-form record.

Regards

Jeff Boyce
Microsoft Office/Access MVP



Saylindara said:
The same EventName can be attended by many people on different dates at
different locations.

:

So it isn't the same field, it's something like [PredictedDuration]
and
[ActualDuration]?

I'm still somewhat puzzled, though. If your main-form/subform
construction
is standard, the subform refers to a "many" table, related to the
main-form
(the "one" table). I would think that "predicted" and "actual" are
both
characteristics of the event, not one related to the event and the
other
related to some kind of "child" record.

What are you pointing that subform at?

Regards

Jeff Boyce
Microsoft Office/Access MVP

I've got a main form Event with a field Duration showing how long
the
event
is predicted to last. On the subform I've got attendance details and
a
field
Duration to show how long the event actually lasted. Most likely it
will
be
the same amount of time which is why I wanted the default value from
the
main
form. Is there a better way?

:

It sounds like you are saying you want to record the same value in
two
different tables (i.e., one table for the main form, another table
for
the
subform). Why is that? Using a relational database like Access,
you
shouldn't need to.

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

message
How can I make a value on a form the default value on a subform?
 
Back
Top