changing default value

  • Thread starter Thread starter RipperT
  • Start date Start date
R

RipperT

I have a form in datasheet view with 2 fields that are cbo boxes with a list
of values to choose from. One field just has 8 or 9 from which to choose,
the other is thousands. I would like to set up a form/subform in which the
user will be able to first select one of these 8 or 9 values in maybe an
unbound cbobox, thereby setting it as the default value while they enter
some records, then change it to another default value etc. How can I do
this?

Many thanx,

Rip
 
create a main form, add an unbound combo box control (which i'll call
cboChoice), and set the control's RowSource property the same as the combo
box control in your "current" form (the form you described in your post).
add your "current" form to the main form, as a subform. in the subform's
form BeforeInsert event procedure, add code to set the value of the combo
box control on the subform to whatever value was selected in the unbound
combo box control on the main form, as

Me!ComboBoxName = Me.Parent!cboChoice

substitute the correct name of the combo box control on the subform, of
course.

hth
 
Worked like a charm. Many thanx,

Rip

tina said:
create a main form, add an unbound combo box control (which i'll call
cboChoice), and set the control's RowSource property the same as the combo
box control in your "current" form (the form you described in your post).
add your "current" form to the main form, as a subform. in the subform's
form BeforeInsert event procedure, add code to set the value of the combo
box control on the subform to whatever value was selected in the unbound
combo box control on the main form, as

Me!ComboBoxName = Me.Parent!cboChoice

substitute the correct name of the combo box control on the subform, of
course.

hth
 
Back
Top