Full Version: Search Form: Question About Combo Boxes
UtterAccess Forums > Microsoft® Access > Access Forms
charblake
Hello!
I have a search form in my database, that includes a few combo boxes that allows the user to choose from a list that is driven by data on the table. They make their choices within the combo boxes, which populates the sub form with the filtered data. From this form, they can also view/print reports based on that data.
Two of my combo boxes, are the "start date" and "end date" of the data being requested. Because of how the data is delivered, it is not possible to allow the user to choose a "date range" - the start and end dates must be exact matches to the start and end dates located on the table. Here is my question:
What do I need to do in order to combine the "start date" and "end date" on a 2-column combo box, to filter the records the same way they do when the dates are chosen from separate drop downs? When I created the combo box, it was populated with the correct data from the table, but the filtered records did not show up on the sub form, nor on a report - they were all blank. So, it seems like I'm missing something pretty huge to make it work right - and I would appreciate any assistance you could give me!
If it would help for me to post some part of what I have already, I can do that too. <
theDBguy
Hi,
had a hard time following your setup just from your description. So if you could post a copy of your db, I think it would help.
Just my 2 cents...
charblake
Thank you for responding - I have attached a copy... It's still a work in progress, so, it's not the prettiest!
charblake
Hi Larry -
Thank you for your assistance, I really appreciate it! I see that all of the combined dates are populating the combo box you created on the form - is there a way to get those filtered records to show on the subform (and then the form too, after those controls are clicked)?
charblake
Hmmmm... well that's odd - It looks perfect, looking at the screenshot you uploaded! I've looked at everything and it's set up exactly as you stated, and I can see that you were able to select the dates which populated the sub form, but for some reason it doesn't work for me, my sub form will not update.
Larry Larsen
Hi
Does my returned demo work for you..??
dle" emoid=":thumbup:" border="0" alt="thumbup.gif" />
Larry Larsen
Hi
Just an after thought, make sure you bound column of the combo is set against the the string and not ID..
"https://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif" style="vertical-align:middle" emoid=":thumbup:" border="0" alt="thumbup.gif" />
charblake
Hello
So, your demo didn't work for me... and I think my properties are set right - I have column 2 set as bound...
charblake
OK, well thank you for your help and your time, I really appreciate it. I'll have to keep working on it to figure out why it won't work for me. My settings are all the same as yours.
charblake
Hi Larry,

I'm sorry to bother you again with this, but could you please take another look at this (I've attached the test copy I'm working on) and see if you can tell what I have set up incorrectly? (Or anyone else who might be able to tell by looking....) I have pulled most of my hair out trying to figure this out, but I don't see the issue. I've tweaked the elements you pointed out in your last post, but still to no avail - I'm unable to get the subform or the reports for that matter, to populate with the data filtered by this date box.
appreciate your help and thank you.
charblake
Hi Larry,
Well, I opened it, saved it on my desktop to ensure it had full functionality (wasn't going to take any chances...) - and I chose one of the drop down dates (from the start/end date box) - but no, still nothing populates.
walked through everything and looked for your changes - I didn't see anything in the criteria field for the "StartEndDate" so maybe it was lost in the transfer somehow? One thing I did notice was in the query "qryAUNA1" - the first field is an EXP1:... I wasn't sure if that was supposed to be there or not, it didn't really look like it belonged there.
What are your thoughts? How can this combo box act so differently with you than it does for me?
I guess we're going to be friends a little longer than we thought... <
charblake
Hi Larry
Sorry for the delay, but I wanted to make sure I went through every element of this DB and triple checked all of the code, settings, etc. I'm almost positive I have everything set up exactly as you have suggested and no, my sub-form is still not being populated. I'm sure it has to be something small but not obvious... are there any changes I need to make to my sub-form to make it work?
bviously it doesn't make sense that you have pulled up the information on your end - you attach that DB here - I open it and try exactly the same thing, and nothing happens. Now it's gone beyond an issue I'm trying to conquer - now it's a mystery I'm trying to solve!
So, the essence of the issue now is: "StartEndDate" in the last column of my table isn't populated with the "Start Date" and "End Date" string combinations; and the sub-form doesn't populate with any results after being filtered.
If I haven't following your guidance exactly, and that is what is keeping it from working for me - could you please let me know what I am missing?
Thank you much for your time!! pullhair.gif
charblake
Hi Larry - thanks for looking at it...
So, am I supposed to set that (start date) criteria for the end date too on the query?
charblake
Thank you Larry - I finally got it working! I appreciate your help <
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.