linked field not updating after group box selection

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Source qry for form is
*Request
RequestID
PriorityID
with a many-to-one relationship to
*Priority
PriorityID
PriorityCode

When Mr. Wizard setup my group box and linked it to the Request[PriorityID],
the group default would display in a text box also bound to that field. What
I really want to display however is Priority[PriorityCode]. It works fine
when one changes the option in the group box, just not on entry when I want
the default value.

Am I missing something? Should I just have the text box bound to
PriorityCode also default to the value I want? (seems like a hack to me).


TIA,
Eric
 
What is a "group box"? Please provide more information about your form. Post
the SQL statement of the form's RecordSource. Is the syntax
"Request[PriorityID]" meant to refer to the PriorityID field from the table
Request?
 
Sorry Ken. Being a 'newbie' is much more painful for me that you :-)

This is the record source query for the detail section of my form:
SELECT Request.RequestID, Request.PriorityID, Request.PriorityOrderWithinID,
Request.IssueCategoryID, Request.IssueTopic, Request.IssueDetail,
Request.ProposedSolution, LoadInPriority.PriorityCode
FROM LoadInPriority
INNER JOIN (IssueCategory INNER JOIN Request ON
IssueCategory.IssueCategoryID = Request.IssueCategoryID) ON
LoadInPriority.PriorityID = Request.PriorityID;

A "group box" is better known as an Option Group. It's control source is the
field Request.PriorityID, and when I first created this control with the
Option Group Wizard, and ran my form,, a new 'tentative' record would have
the correct default option selected, and its value would display in the
Priority field. I subsequently changed that text box control' source from
PriorityID to (LoadInPriority.)PriorityCode, which is what I really wanted
to display (it's control source is PriorityCode), but inadvertantly forgot
to change the name of the control.

Having realized this as I am attempting to answer your offer to help me, I
changed the name of the control to PriorityCode, and re-added the PriorityID
field to the form. Both of them update properly if I select a control (any
control), but neither one shows a default value as it did when I originally
created the Option Group control in the first place.

Does this make sense to you?

Thanks!


Ken Snell said:
What is a "group box"? Please provide more information about your form.
Post the SQL statement of the form's RecordSource. Is the syntax
"Request[PriorityID]" meant to refer to the PriorityID field from the
table Request?
--

Ken Snell
<MS ACCESS MVP>



Eric said:
Source qry for form is
*Request
RequestID
PriorityID
with a many-to-one relationship to
*Priority
PriorityID
PriorityCode

When Mr. Wizard setup my group box and linked it to the
Request[PriorityID], the group default would display in a text box also
bound to that field. What I really want to display however is
Priority[PriorityCode]. It works fine when one changes the option in the
group box, just not on entry when I want the default value.

Am I missing something? Should I just have the text box bound to
PriorityCode also default to the value I want? (seems like a hack to me).


TIA,
Eric
 
The default value of the option group can be set in one of two places.

Because you've bound it to a field in the recordsource, you can set the
Default Value of that field in the design view of the table that contains
the field. That will propogate to the form so long as the Default Value for
the option group itself is "empty" in the form's design view.

The other way is to set the value in the form's design view for the option
group itself.

Either way, you should be able to get the desired default value for new
records.

--

Ken Snell
<MS ACCESS MVP>


Eric said:
Sorry Ken. Being a 'newbie' is much more painful for me that you :-)

This is the record source query for the detail section of my form:
SELECT Request.RequestID, Request.PriorityID,
Request.PriorityOrderWithinID, Request.IssueCategoryID,
Request.IssueTopic, Request.IssueDetail, Request.ProposedSolution,
LoadInPriority.PriorityCode
FROM LoadInPriority
INNER JOIN (IssueCategory INNER JOIN Request ON
IssueCategory.IssueCategoryID = Request.IssueCategoryID) ON
LoadInPriority.PriorityID = Request.PriorityID;

A "group box" is better known as an Option Group. It's control source is
the field Request.PriorityID, and when I first created this control with
the Option Group Wizard, and ran my form,, a new 'tentative' record would
have the correct default option selected, and its value would display in
the Priority field. I subsequently changed that text box control' source
from PriorityID to (LoadInPriority.)PriorityCode, which is what I really
wanted to display (it's control source is PriorityCode), but inadvertantly
forgot to change the name of the control.

Having realized this as I am attempting to answer your offer to help me, I
changed the name of the control to PriorityCode, and re-added the
PriorityID field to the form. Both of them update properly if I select a
control (any control), but neither one shows a default value as it did
when I originally created the Option Group control in the first place.

Does this make sense to you?

Thanks!


Ken Snell said:
What is a "group box"? Please provide more information about your form.
Post the SQL statement of the form's RecordSource. Is the syntax
"Request[PriorityID]" meant to refer to the PriorityID field from the
table Request?
--

Ken Snell
<MS ACCESS MVP>



Eric said:
Source qry for form is
*Request
RequestID
PriorityID
with a many-to-one relationship to
*Priority
PriorityID
PriorityCode

When Mr. Wizard setup my group box and linked it to the
Request[PriorityID], the group default would display in a text box also
bound to that field. What I really want to display however is
Priority[PriorityCode]. It works fine when one changes the option in the
group box, just not on entry when I want the default value.

Am I missing something? Should I just have the text box bound to
PriorityCode also default to the value I want? (seems like a hack to
me).


TIA,
Eric
 
Back
Top