Setting one Combo Box using the other

J

Jay

I am running Access97. The application has a number of combo boxes for
setting report criteria. They are Cbo_1 and Cbo_2. If I sellect or set a date
in Cbo_1 as the starting date, I'd like to have to Cbo_2 be set or default to
one day or date earlier, then, I'd like for that date listed in Cbo_2 to be
plugged into a control on the MainMenu called "EndDate" automatically just as
it would be done when I set Cbo_1 in the AfterUpdate event as well. Cbo_1
would plug the date into a control on the MainMenu form called "StartDate".
Both combo boxed are feeding off of the same date table, so the dates would
be sequencial for the most part!

Is this possible? If so how?

Thanks,
 
J

Jeff Boyce

Jay

I'm not clear on what you are trying to do.

Are you trying to connect values in one place (your combo boxes) with values
in a table, or in another form (your Main Menu)?

Why? As in "what will doing this help you accomplish?" I ask because there
may be alternate ways to get done what you are trying to do.
 
J

Jay

Thanks for chiming in Jeff.

What I'm want to do is to sellect or set combo box Sbo_1 to say Oct-15-2005
for the report criteria and have Cbo_2 automatically default to Oct-14-2005.
Now, when I sellect the date in Cbo_1, I plug that value into a control on
the MainMenu form in a hidden field, then grab it via Global retreive
function and pass it along to where ever it is needed within the application.
I want the same process to take place within Cbo_2 once it is defaulted to
Oct-14-2005. I'd it's value to be plugged into a control on the MainMenu too
using the AfterUpdate Event of the Cbo_1 (Cbo_2). I hope I was a bit clearer.
Anyway, if there are still questions, please post back. It will probably be a
couple of hours before I can get back to you due to medical appointments. I
do appreciate the help......

Thanks
 
J

Jeff Boyce

Jay

If you are saying you want the value in a control to be set to the date in
another control, minus one day, one approach would be to use the DateAdd()
function in the AfterUpdate event of the first control.
 

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