Setting Default Value in a combo box

  • Thread starter Thread starter googlejunk
  • Start date Start date
G

googlejunk

Hope I can get some help.

I have a combo box, that is bound to a table. The table has two
columns. I am bounding the combo box to column two. The user, in the
interface will pick a selection from the first column, however, I am
storing the second column corresponding data.

Example. Column one has A, B, C, D. Column two has numbers, that will
change from year to year. Like A this year has a value of 26, but next
year might be 28.

Anyways, I'd like the combo to default to A, but when I try to set the
default value on the properties page to A, it doesn't like that.

Any suggestions is appreciated.

Thanks
 
If you are saying that you are storing "26", wouldn't you need to set the
default value to that, rather than "A"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Yes, however, next year, it might be 28 and if I have the default value
set to 26, then someone who has skills in access will need to go back
and adjust the default value of all the combo boxes. The A B C D will
always remain constant. So, thus, if i can set the default to be A,
then it doesn't matter what the value in column two will be from year
to year, it will pick whatever the value for A is and store that...make
sense?
 
I guess I'm missing something. If "A" is constant from year to year, why
are you storing 26 and 28 and 37 and ...?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A B C D are difficulty levels or degree of difficulty, if you will.
The answer, in this case for A is 26. So, based on that, then we know
to multiply by 26 as a factor...

Make sense?
 
Sorry, not yet.

If you are saying that "A" is a "degree of difficulty", and that for Year =
2006, the multiplier is 26, but for Year=2007, the multiplier is 28, and so
on, then your description is leaving out the data you need to make your
determination ... which year?!

If the multiplier depends on both the rating and the year, you need records
that can store all three pieces.

Another potential structure might be:

tblMultiplierLookup
MultiplierID (a unique row identifier, perhaps an Autonumber)
DegreeOfDifficulty
YearOfMultiplier
Multiplier

Will this do what you're looking for?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Ok, let me see if I can take a better stab at explaining this. While I
said the degree of difficulty might change next year, it could in fact
change at any given time.

So, let's try this. Let's say today, that Management says that the
following is true, today.

A = 26
B = 30
C = 35
D = 45

A is indicated as being an easy job and D is the indicator for stating
the job is harder. So, the sales person, goes out to the job, survey's
the job and determines, based on his gut feeling, that the job is easy
to hard, A B C or D. I use the answer to A B C or D as my multiplier.

No, let's say that Management looks at the indicators above tomorrow
and determines that they should produce at a higher rate, so they
adjust as follows:

A = 30
B = 40
C = 45
D = 55

So, now any NEW proposal that is generated, will pick up the new
numbers as indicated above.

My problem is that I want all the various combo boxes that us A B C or
D, to default to A, so that I can have a summary page show no value,
until they start filling in the various areas. Well, in the first
example, I could use 26 as my default and A would appear, but what
happens when management now says A is 30. The default of 26 will no
longer produce an "A" in the box and thus cause issues across the
board.

So, thus I am trying to have it, that when they create a new proposal,
that all the various combo boxes are set to A.

As you can see, the year, really doesn't have anythig to do with it,
and I am sorry if that threw you off.

Thanks

Ron
 
Ron

I suspect my intent is still on track, even though we don't need
"YearOfRating".

If yesterday's "A" was worth 26 and tomorrow's "A" is worth 30, then you
need a date/time field instead of the [YearOfRating] field. You still need
the MultiplierID field I mentioned, because THAT is what you store, not "A",
and not "26" (or "30", or ...).

You can use a combo box in a form to display "A", "B", ...

Behind the scenes, you are ONLY displaying the "current" (per the date/time
field) A's, B's, ...

What shows is "A". When you do the calculation, Access looks at the
MultiplierID to find the Multiplier for "A", for the currently valid
instance of "A".

What this also adds is the ability to have yesterday's record of "A" be
associated with a Multiplier of 26, while tomorrow's can be associated with
a Multiplier of 30.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Took me awhile to get it to work, but your idea works great.

Thanks a bunch for the help/guidance. I certainly would have not
thought to go down this path. Surprisingly, works well.

Thanks again,

Ron

Jeff said:
Ron

I suspect my intent is still on track, even though we don't need
"YearOfRating".

If yesterday's "A" was worth 26 and tomorrow's "A" is worth 30, then you
need a date/time field instead of the [YearOfRating] field. You still need
the MultiplierID field I mentioned, because THAT is what you store, not "A",
and not "26" (or "30", or ...).

You can use a combo box in a form to display "A", "B", ...

Behind the scenes, you are ONLY displaying the "current" (per the date/time
field) A's, B's, ...

What shows is "A". When you do the calculation, Access looks at the
MultiplierID to find the Multiplier for "A", for the currently valid
instance of "A".

What this also adds is the ability to have yesterday's record of "A" be
associated with a Multiplier of 26, while tomorrow's can be associated with
a Multiplier of 30.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Cy said:
Ok, let me see if I can take a better stab at explaining this. While I
said the degree of difficulty might change next year, it could in fact
change at any given time.

So, let's try this. Let's say today, that Management says that the
following is true, today.

A = 26
B = 30
C = 35
D = 45

A is indicated as being an easy job and D is the indicator for stating
the job is harder. So, the sales person, goes out to the job, survey's
the job and determines, based on his gut feeling, that the job is easy
to hard, A B C or D. I use the answer to A B C or D as my multiplier.

No, let's say that Management looks at the indicators above tomorrow
and determines that they should produce at a higher rate, so they
adjust as follows:

A = 30
B = 40
C = 45
D = 55

So, now any NEW proposal that is generated, will pick up the new
numbers as indicated above.

My problem is that I want all the various combo boxes that us A B C or
D, to default to A, so that I can have a summary page show no value,
until they start filling in the various areas. Well, in the first
example, I could use 26 as my default and A would appear, but what
happens when management now says A is 30. The default of 26 will no
longer produce an "A" in the box and thus cause issues across the
board.

So, thus I am trying to have it, that when they create a new proposal,
that all the various combo boxes are set to A.

As you can see, the year, really doesn't have anythig to do with it,
and I am sorry if that threw you off.

Thanks

Ron
 
?!?Surprisingly?!? <g>

Jeff

Cy said:
Took me awhile to get it to work, but your idea works great.

Thanks a bunch for the help/guidance. I certainly would have not
thought to go down this path. Surprisingly, works well.

Thanks again,

Ron

Jeff said:
Ron

I suspect my intent is still on track, even though we don't need
"YearOfRating".

If yesterday's "A" was worth 26 and tomorrow's "A" is worth 30, then you
need a date/time field instead of the [YearOfRating] field. You still
need
the MultiplierID field I mentioned, because THAT is what you store, not
"A",
and not "26" (or "30", or ...).

You can use a combo box in a form to display "A", "B", ...

Behind the scenes, you are ONLY displaying the "current" (per the
date/time
field) A's, B's, ...

What shows is "A". When you do the calculation, Access looks at the
MultiplierID to find the Multiplier for "A", for the currently valid
instance of "A".

What this also adds is the ability to have yesterday's record of "A" be
associated with a Multiplier of 26, while tomorrow's can be associated
with
a Multiplier of 30.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Cy said:
Ok, let me see if I can take a better stab at explaining this. While I
said the degree of difficulty might change next year, it could in fact
change at any given time.

So, let's try this. Let's say today, that Management says that the
following is true, today.

A = 26
B = 30
C = 35
D = 45

A is indicated as being an easy job and D is the indicator for stating
the job is harder. So, the sales person, goes out to the job, survey's
the job and determines, based on his gut feeling, that the job is easy
to hard, A B C or D. I use the answer to A B C or D as my multiplier.

No, let's say that Management looks at the indicators above tomorrow
and determines that they should produce at a higher rate, so they
adjust as follows:

A = 30
B = 40
C = 45
D = 55

So, now any NEW proposal that is generated, will pick up the new
numbers as indicated above.

My problem is that I want all the various combo boxes that us A B C or
D, to default to A, so that I can have a summary page show no value,
until they start filling in the various areas. Well, in the first
example, I could use 26 as my default and A would appear, but what
happens when management now says A is 30. The default of 26 will no
longer produce an "A" in the box and thus cause issues across the
board.

So, thus I am trying to have it, that when they create a new proposal,
that all the various combo boxes are set to A.

As you can see, the year, really doesn't have anythig to do with it,
and I am sorry if that threw you off.

Thanks

Ron
Jeff Boyce wrote:
Sorry, not yet.

If you are saying that "A" is a "degree of difficulty", and that for
Year
=
2006, the multiplier is 26, but for Year=2007, the multiplier is 28,
and
so
on, then your description is leaving out the data you need to make
your
determination ... which year?!

If the multiplier depends on both the rating and the year, you need
records
that can store all three pieces.

Another potential structure might be:

tblMultiplierLookup
MultiplierID (a unique row identifier, perhaps an Autonumber)
DegreeOfDifficulty
YearOfMultiplier
Multiplier

Will this do what you're looking for?

Regards

Jeff Boyce
Microsoft Office/Access MVP


A B C D are difficulty levels or degree of difficulty, if you will.
The answer, in this case for A is 26. So, based on that, then we
know
to multiply by 26 as a factor...

Make sense?
Jeff Boyce wrote:
I guess I'm missing something. If "A" is constant from year to
year,
why
are you storing 26 and 28 and 37 and ...?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Yes, however, next year, it might be 28 and if I have the default
value
set to 26, then someone who has skills in access will need to go
back
and adjust the default value of all the combo boxes. The A B C D
will
always remain constant. So, thus, if i can set the default to be
A,
then it doesn't matter what the value in column two will be from
year
to year, it will pick whatever the value for A is and store
that...make
sense?


Jeff Boyce wrote:
If you are saying that you are storing "26", wouldn't you need
to
set
the
default value to that, rather than "A"?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hope I can get some help.

I have a combo box, that is bound to a table. The table has
two
columns. I am bounding the combo box to column two. The
user,
in
the
interface will pick a selection from the first column,
however, I
am
storing the second column corresponding data.

Example. Column one has A, B, C, D. Column two has numbers,
that
will
change from year to year. Like A this year has a value of 26,
but
next
year might be 28.

Anyways, I'd like the combo to default to A, but when I try to
set
the
default value on the properties page to A, it doesn't like
that.

Any suggestions is appreciated.

Thanks
 
Back
Top