Combobox contents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table (Days) that has two columns, one with days and t'other with
times (I need to limit certain times with set days). On a form (Students1) I
have a number of combo boxes for staff to enter students' details, one of
which is their prefered day/time. The combo box I am using shows both the
time and day when I 'drop down' but once selected only shows the day. I have
tried adjusting the bound column parameter but to no avail. I have also tried
using a text box and another combo box to display the other part of the
display (time) but this seems to restrict which days I can select in the day
box (seems to only like unique day/time combinations - I have not used
DISTINCT in my query).

Obviously doing something wrong so any help would be much appreciated.

Thanks
 
Hi

Create a new unbound text box and use this a the control source

=ComboName.column(1)

Note . column(1) will show the "second" column in your combo as the count
starts from 0

Hope this helps
 
Thanks Wayne, yes, that works for the unbound text box, but I'm stuck with
the problem whereby the combobox I initially select doesn't allow me to
choose a date/time combination that is duplicated in any way, i.e. I have a
couple of days where the associated time is 1600-1630 - regardless of which
day I select with these times (in column 2) it automatically reverts to
Monday 1600-1630.
 
HI

Sorry I can't your table design and form's layout so can't really look at
the problem.

Can I make a suugestion. Have 2 combo boxes - this seems the way I would do
it.
You have a table with 2 columns 1 with date or day and another with time.

If it were me I would be tempted to create 2 combos based on the columns.
The results are stored and can very simply be concencated in reported (or
even on your form if the users need to see it this way).
 
Thanks Wayne - appreciate it's very difficult when it's not in front of you.
Yes, I see where you're coming from but I have days and times that are
inextricably linked, i.e. I want to restrict the choice of combinations of
days and times. If only the combo box displayed two columns!

Ok, thanks for trying.
 
....0k, sorted it now - as you mentioned (I read your post again) I have
concacenated the SQL to get the results displayed in the combobox - Thanks
Wayne, great 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