Q. Can I use a combo box to select values from, to enter into my table?

J

Jim Jones

Hi,

I have a subform with a field that will have no more than 30 different
items. I'd like to use a combo box to do this, but how?

Do I have to set up the table field as a combo box ?
The form field as a combo box?
Or both fields as combo boxes?

It seems that the table field, when set up as combo box works
perfectly. But when the form field is set up as combo box also, it
doesnt return the value I want, and it doesnt enter it into the
underlying table.

Can someone help?

Thanks,
Jim
 
J

John Vinson

Do I have to set up the table field as a combo box ?
The form field as a combo box?
Or both fields as combo boxes?

It seems that the table field, when set up as combo box works
perfectly. But when the form field is set up as combo box also, it
doesnt return the value I want, and it doesnt enter it into the
underlying table.

Ok. You're yet another victim of Microsoft's misdesigned, misleading,
disruptive and all but useless Lookup Wizard. (Right. I DON'T like
lookup fields).

The table DOES NOT CONTAIN what it appears to contain. The lookup
wizard is concealing a numeric value behind the visible text.

See my reply in the other thread. The answers to my questions there
should help us track down the simplest solution!
 
J

Jim Jones

Ok. You're yet another victim of Microsoft's misdesigned, misleading,
disruptive and all but useless Lookup Wizard. (Right. I DON'T like
lookup fields).

The table DOES NOT CONTAIN what it appears to contain. The lookup
wizard is concealing a numeric value behind the visible text.

See my reply in the other thread. The answers to my questions there
should help us track down the simplest solution!

John,

After many attempts last night, I finally got it working ( I think),
but I now have a question:

Does it store in the same table field as my data record, the combo
box list of items? This concept confuses me.

Now, I think I broke something:

See, the new problem is this:

It has to do with a combo box on my main form.

OK, On my main form, I have a combo box, which I set up
after much difficulty. The only purpose of this first combo
box is to look up a record on the main form and move to it.

OK, if the value is in the combo box, it will move to that
record, but if the value is not here (basically a customer's
last name), it will give me a debug error, when I go to click
on the
customer last name field, when I go to begin entering the
the new data record.

I would rather it just let me enter the new record, without
flagging the missing item the way it does, asking me to hit
"en" or "debug" on the message box.

Can you guide me to fixing this?.

Thanks,
Jim
 
J

John Vinson

After many attempts last night, I finally got it working ( I think),
but I now have a question:

Does it store in the same table field as my data record, the combo
box list of items? This concept confuses me.

A Combo Box GETS data from its Rowsource - which might be a table or
might be a List of Values.

It STORES the selected value from that list into its Control Source,
which is typically a field in a different table.

It does not store anything back into its own rowsource.

A combo box listing customer names should - I'd say MUST - be based on
a Table/Query, not on a List of Values. A List of Values combo box is
useful if that list is short and static - for instance a combo box for
Title with a RowSource of "Mr.";"Ms.";"Miss";"Mrs.";"Dr." would be
reasonable. A long and varying set of values such as a list of names
should be based on a table which you can edit.
Now, I think I broke something:

See, the new problem is this:

It has to do with a combo box on my main form.

OK, On my main form, I have a combo box, which I set up
after much difficulty. The only purpose of this first combo
box is to look up a record on the main form and move to it.

This should be an *UNBOUND* combo box - that is, it should have
nothing at all in its Control Source property. If the function of the
combo is to search for a record, you don't want it to overwrite the
current record's value!
OK, if the value is in the combo box, it will move to that
record, but if the value is not here (basically a customer's
last name), it will give me a debug error, when I go to click
on the
customer last name field, when I go to begin entering the
the new data record.

I would rather it just let me enter the new record, without
flagging the missing item the way it does, asking me to hit
"en" or "debug" on the message box.

Can you guide me to fixing this?.

Not unless you describe the debug error and the code that you're using
to find the record. And... AS I HAVE ASKED BEFORE - the properties of
the combo box. You can see your database; I cannot.
 
J

Jim Jones

A Combo Box GETS data from its Rowsource - which might be a table or
might be a List of Values.

It STORES the selected value from that list into its Control Source,
which is typically a field in a different table.

It does not store anything back into its own rowsource.

A combo box listing customer names should - I'd say MUST - be based on
a Table/Query, not on a List of Values. A List of Values combo box is
useful if that list is short and static - for instance a combo box for
Title with a RowSource of "Mr.";"Ms.";"Miss";"Mrs.";"Dr." would be
reasonable. A long and varying set of values such as a list of names
should be based on a table which you can edit.


This should be an *UNBOUND* combo box - that is, it should have
nothing at all in its Control Source property. If the function of the
combo is to search for a record, you don't want it to overwrite the
current record's value!


Not unless you describe the debug error and the code that you're using
to find the record. And... AS I HAVE ASKED BEFORE - the properties of
the combo box. You can see your database; I cannot.


John,

I'm just getting mroe and more confused with this combo box issue.

I'm still finding new issues with them. I'll document what happens and
when, and then give you a clear scenario of what happens.

Of course, I know you asked me to provide you with info, which I've
yet to do.

Please bare with me, as I too have to figure out what's wrong to tell
you about.

I do suspect though that it's a corruption in the database, even
though I do have it set to compact/repair upon exit of the database.

Thanks,
Jim
 
J

John Vinson

John,

I'm just getting mroe and more confused with this combo box issue.

I'm still finding new issues with them. I'll document what happens and
when, and then give you a clear scenario of what happens.

Of course, I know you asked me to provide you with info, which I've
yet to do.

Please bare with me, as I too have to figure out what's wrong to tell
you about.

Let's start a new thread when you do so, in order that others will be
encouraged to chime in. I may well be missing something about this
myself!
 

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

Top