Combobox default value

  • Thread starter Thread starter matty ratafairy
  • Start date Start date
M

matty ratafairy

Hello, I have two comboboxes based on another and the new ones "show" the
values I want - there is only the one item in the new drop down lists as the
data is filtered by school name. However, the calculation that uses this data
will not continue until i actually select this data fromthe drop down box.

1st combobox = School name
2nd combobox = Summer holiday start date
3rd combobox = Summer holiday end date
(Further calc is length of summer holiday).

I have default for the value in 2nd and 3rd set as itemdata(0).

Is there a way to force this data to be accepted automatically without
having to go into the combobox and clicking on it?

Any help would stop me pulling out more of my hair.
Thanks in advance
 
well....since combo2 & 3 are dishing out a value , rather than offering a
choice to the user (which is the purpose of a combobox) then I would change
them to textboxes

I would get the StartDate and EndDate values via the query that underlies
combo1 and then fillin box2 & 3 from it:

1st combobox = School name
2ndbox = me.[1st combobox].column(2)
3rdbox = me.[1st combobox].column(3)
 
Matty,
you can set the 3rd combo's value by this line of code:

Me.ThirdCombo = Me.ThirdCombo.DefaultValue

the above should make the end date available from the 3rd combo

Jeanette Cunningham
 
Thanks for the reply, igot another suggestion which is on the thread which
makes it work. I thought a text box was the way to go just didnt know the
coding.
Thanks anyway for your valuable help.
 

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

Back
Top