Conditionally present a Drop down list

All of the entire Database is all set and normalized, etc. All that is needed is a Data Entry Form which simply emulates the Excel in the format I previewed. I can program the data entry into the normalized and existing Tables from that. Obviously, the normalized table (the next step after the data entry) looks NOTHING like the data entry form/table.
 
All of the entire Database is all set and normalized, etc. All that is needed is a Data Entry Form which simply emulates the Excel in the format I previewed. I can program the data entry into the normalized and existing Tables from that. Obviously, the normalized table (the next step after the data entry) looks NOTHING like the data entry form/table.
Okay, that sounds good. Can you post a small copy of your real db, so we can help you figure out how to create the data entry form based on your actual table structure?
 
The table is the normalized next step after the compact data entry form. This again is only a temporary "work" file ...
 

Attachments

Last edited:
The table is the normalized next step after the compact data entry form. This again is only a temporary "work" file ...
Hi. The db you posted only has one table in it, so it can't be a properly normalized structure. If you're not familiar with database "normalization," I would suggest reading up a little on the topic. There are plenty of resources on that subject, so I don't want to give you just one link about it. Let us know if you have any questions.
 
Hi. The db you posted only has one table in it, so it can't be a properly normalized structure. If you're not familiar with database "normalization," I would suggest reading up a little on the topic. There are plenty of resources on that subject, so I don't want to give you just one link about it. Let us know if you have any questions.
This is not about me knowing anything more about normalization. If it is simply not possible to do/simulate any of the things I have asked about, then so be it! There is no need for anyone to dig any deeper into what my fully comprehensive working Database looks like.
 
This is not about me knowing anything more about normalization. If it is simply not possible to do/simulate any of the things I have asked about, then so be it! There is no need for anyone to dig any deeper into what my fully comprehensive working Database looks like.
Hi. I am not saying it's not possible. But without knowing anything about your full database, I can't tell you exactly how to do it. Good luck!
 
Hi. I am not saying it's not possible. But without knowing anything about your full database, I can't tell you exactly how to do it. Good luck!

I appreciate that U have spent much time trying to help me. My hope is that, since this is a worldwide forum, someone else can maybe point me in a helpful direction - aimed directly at my question.
 
I appreciate that U have spent much time trying to help me. My hope is that, since this is a worldwide forum, someone else can maybe point me in a helpful direction - aimed directly at my question.

Hi. I thought I answered your question earlier. If you open the file I gave you earlier, does it not do what you asked? For example, without selecting anything from the combobox, try clicking the dropdown from one record to another. Don't you see the dropdown selections change based on what is in field1? Wasn't that your original question?

Now, I did mention your sample db didn't make sense for what you're trying to do because, as you found out, once you select an item from the dropdown, that choice shows up in all the rows. I also told why that was. It was because you were using an unbound dropdown.

I have an idea. See what happens if you take the file I gave you and bind the dropdown to field2 in your table. What do you see?
 
Last edited:
The dropdown on field2 only applies on rows when the field1 = "Customer"
 
"I have an idea. See what happens if you take the file I gave you and bind the dropdown to field2 in your table. What do you see?"

This was an improvement as there are no entries appearing in the dropdown on rows where field1 is not = Customer.

Best wud be to not even reference a dropdown on those rows - but not seeing anyone suggest how (or IF) that can even be accomplished.
 
Best wud be to not even reference a dropdown on those rows - but not seeing anyone suggest how (or IF) that can even be accomplished.
Hi. Just a guess but maybe no one suggested it because no one knows what it is you're actually trying to accomplish. If you had asked how not to reference a dropdown, I would have probably told you how. Instead, you asked how to change the list, so that's what I answered. Since we can't see what you're doing, we can only go by what you said in your posts.
 
TOPIC: Re: Conditionally present a Drop down list

Hi. But context is everything. We can't read your mind. Modifying the dropdown list is one interpretation of conditionally presenting it, which I didn't really pull out of thin air because it was literally what you wrote in your original post. But in your last post, you used the word "reference" instead of "present," which could mean something else, or at least may solicit a different answer/solution.
 
Last edited:
If I have a form based on a table with 2 fields.

If field1 = "Customer", then I want field2 to show a dropdown list from another table with 1 field in it, else no dropdown list should apply.

Not quite sure best way to approach ?
 
Hi. But context is everything. We can't read your mind. Modifying the dropdown list is one interpretation of conditionally presenting it, which I didn't really pull out of thin air because it was literally what you wrote in your original post. But in your last post, you used the word "reference" instead of "present," which could mean something else, or at least may solicit a different answer/solution.

Take a BREAK, my man! U have helped me much already in the recent past, and for U to give your time and skills to help others is an awesome thing!
 
Take a BREAK, my man! U have helped me much already in the recent past, and for U to give your time and skills to help others is an awesome thing!

Hi. Thanks. I had to go out earlier and pick our tree. Now, I'm trimming it. Later, I need to put up the lights. Good luck with your project.
 
If field1 = "Customer", then I want field2 to show a dropdown list from another table with 1 field in it, else no dropdown list should apply.
Not quite sure best way to approach ?

If this is in single form view you use the on current event and the field1 afterUpdate to put the code
me.SomeCombo.visible = not isnull(me.field1)
So that will show or hide the combo based on field 1

If this is continuous view then you cannot hide the combo. You must use conditional formatting to enable/disable it. You can modify the colors as well.

With a textbox you can kind of make it invisible in a continuous form by setting the forecolor and backcolor to equal the detail sections backcolor. So it looks like it is invisible. With a combo, I doubt it will work because of the gray down arrow.
 
Last edited:
"If this is continuous view then you cannot hide the combo. You must use conditional formatting to enable/disable it. You can modify the colors as well."

YES. It is continuous and I do know how to change colors/shading, but cannot get the code down which will enable/hide the combo - essentially switching between a text box and combo box - as I still need to be able to enter data into field2 when the row does NOT have field1="customer"
 
Last edited:
but cannot get the code down which will enable/hide the combo - essentially switching between a text box and combo box - as I still need to be able to enter data into field2 when the row does NOT have field1="customer"

You understand if you hide the combobox or modify a control in anyway it will change every representation of that control on a continuous form. Is that OK? Usually the answer is no. If that is OK then you can do the modification in the on current event and the after update. If not you are out of luck. As I said you can enable/disable in conditional format which is likely your best option
 
I think I am not gonna get this to work perfectly. The best I think I can do is to have the dropdown to always be there - but to not show any values in the dropdown - if field1 not = "Customer" - as was demonstrated for me before by DBguy.

Unfortunately, as was the case in the fully implemented Indexed IT Systems from IBM and others in years Past, and although not geared to basic normalization rules, there was what was called "Multiple Record Types" in a File, and one had the flexibility to program at will for a "given" record type as identified in the file...
 

Users who are viewing this thread

Back
Top Bottom