change a Field into a Combo Box

F

Frits.van Leeuwen

Hello,

I've a form with a combo box.
When you choose something in thise Combo Box, it set some Fields on the same
form.
But now, I like to see also a change from a Field into a Combo Box.

How can I do this?

Regards,
Frits van Leeuwen
 
J

Jeff Boyce

Frits

If you open the form in design view, highlight one of those textboxes (they
are "fields" in a table, but "controls" in a form or report), you can change
it from textbox to combobox.

Be aware, however, that you will still need to tell Access how to set up
that (new) combobox.

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
F

Frits.van Leeuwen

Thanks Jeff, for your answare.

But it's not what I'm looking for. I mean: when I choose in a Combo Box one
of the chooses, I like to change in the same form a Field into a Combo Box.

So I like to change, when I choose something.
 
J

John W. Vinson

But it's not what I'm looking for. I mean: when I choose in a Combo Box one
of the chooses, I like to change in the same form a Field into a Combo Box.

So I like to change, when I choose something.

I'm not following what you're trying to do.

A combo box is not a field. It's not data.

A combo box is *just a display tool* - a way to display data on a form (or, if
you unwisely use the Lookup datatype, in a table). It's not data.

Are you intending to change a Textbox control on your form into a Combo Box
control, based on a choice in another field? That is, redesign the structure
of the form? If so, why?
 
F

Frits.van Leeuwen

Thanks John for asking.
I try it again. (sorry for my English)

It's in my mind, a Combo Box is a list of data where you can select one. And
you can type to help select one.

So I have this on a from. And also on the same form I have some Fields.

When I select one in my Combo Box, it gives some data in some fields.
(That's with VBA)

I like to have this, but more. When I select for example the first line in
the Combo Box, then it will set only some data in fields.
And when I select (in the same example) line two, then it will set some data
and change one field into a Combo Box. Then I can make a chooice again.

For example: I select a office, but ther work more people, so I need to
select one of them. In a other office there is one one person. So there I
don't need to choose.
 
J

Jeff Boyce

Frits

Here's an idea for another approach.

If some of your offices have only one person, and other offices have more
than one person, you could STILL use a combobox for the persons.

It's just that for the office that has only one, there would be only one
"choice" in that second combobox.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Frits.van Leeuwen said:
Thanks John for asking.
I try it again. (sorry for my English)

It's in my mind, a Combo Box is a list of data where you can select one.
And you can type to help select one.

So I have this on a from. And also on the same form I have some Fields.

When I select one in my Combo Box, it gives some data in some fields.
(That's with VBA)

I like to have this, but more. When I select for example the first line in
the Combo Box, then it will set only some data in fields.
And when I select (in the same example) line two, then it will set some
data and change one field into a Combo Box. Then I can make a chooice
again.

For example: I select a office, but ther work more people, so I need to
select one of them. In a other office there is one one person. So there I
don't need to choose.
 
F

Frits.van Leeuwen

Why I asked this is because I don't like to show the puldown vector at the
right site.
At this moment I've the following situation:
I made a chooice in a Combo Box. When I choose an office with more perons I
make a second Combo Box visible. And whe I choose one with one or no one, I
make it invisible.
Also there is a field what I use. There I put the name in. And in the same
time if fill an other field with a little bit diferent information.

I like to change the field where I put the name in. but maybe this is the
best way, but I like to be sure.
What I like to do looks betterI think.

Jeff Boyce said:
Frits

Here's an idea for another approach.

If some of your offices have only one person, and other offices have more
than one person, you could STILL use a combobox for the persons.

It's just that for the office that has only one, there would be only one
"choice" in that second combobox.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned
in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

Jeff Boyce

Rather than try to change the type of control, consider using two controls.

One combobox, one textbox.

You would make the textbox the exact size of the combobox with drop-down
arrow, and position them both in the same location.

Your code would make one/other visible or not visible, and would load the
appropriate one.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
F

Frits.van Leeuwen

Thanks Jeff,
But that's what I have already, but I like to change a field into a
combobox. (I tried to explane in my last message here)
 
J

Jeff Boyce

Perhaps one of the other newsgroup readers has done this (change a control
from one type to another programmatically). I don't have any experience
doing that.

Good luck!

--

Regards

Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned in
this post. Mention and/or description of a product or service herein does
not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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