Limit to List Setting + Insert Date Using Popup Calendar

J

JK

When I try to set a combo box to limit to list (a combo with all Saturday
dates) and then I click the popup calendar button and try to insert a date
that is not a saturday date, not a date that is in the table behind the combo
- it let's me.

Any idea how I can prevent this. I'm not sure why the limit to list feature
is ignored when entering a date using a popup calendar.

Thanks,
jason
 
M

Mr B

JK,

I would have to do a little testing to try an figure out the answer to your
question, but first, I have to ask:

If you already have the "Saturday" dates in a table andyour combo box is set
to Limit to List and the list of Saturday dates is populated in the combo
box, why would you then have a pop up calendar to select a date?

If you are really wanting to add another "Saturday" date to the list, I
would think that you would just add the next Saturday to the list in the
combo box.

I may be missing something really critical to what you are doing, so forgive
me if I did not get it.
 
J

JK

I guess I didn't provide enough information. The combo box is bound to table
(tblSaturdayDates) and the Criteria of the field in the query is >Date()-14.

The form, where the combo resides, is a form used to enter sales activity
statistics. There are many sales reps and maybe ten or so fields in the form.
When a salesperson submits their activity summary report at the end of the
week, the stats from the excel spreadsheet get entered into the database.

So the admin entering the data has to first select (or enter) the
week-ending date and then the salesperson's statistics. To make things easier
for the admin, since the week-ending date is always a saturday, I decided to
create a table with all saturday dates. This way, the admin can easily select
the date. However, if a salesperson submits their activity summary report
three weeks or more late, the saturday date would not be available in the
comobo becasue of the criteria in the query. If I remove the criteria in the
query, then the admin would have to scroll through a long list to get to the
date the person is looking for.

If a user selects a date using the pop-up calendar and that date is not a
saturday date, I want the not in list event to fire and tell the admin that
it's not a saturday date. This is why I need it to work. If the user manually
enters a date in the combo and the date is not a saturday date the not in
list event fires as intended.

I hope this makes sense and clears things up. I just don't understand why
(or how) the pop-up calendar and circumvent the not in list event. Even if
it's not a saturday date I can still insert it and save the form without any
errors.

Thanks,
Jason
 
M

Mr. B

JK,

As a suggestion, why not have your week-ending date defalut to Saturday of
the current week or if entry is done after the fact you can default to the
previous Saturday as a starting point. Then provide two buttons that will
either decrement or increment the default Saturday by 7 days each time the
appropriate button is clicked. This way the user can work on data entry for
any week at any time any you maintain the fact the dates are always a
Saturday.

Just my two cents worth.
 
J

JK

That's a great idea, I just don't have the programming skills necessary to
pull it off. But maybe I'll take a stab at it when I get back to the office
on Monday. You never know, I guess, I've surprised myself in the past.

Thanks for the advice

Regards,
JK
 
M

Mr. B

JK,

Don't think about trying to "eat the whole elephant". Think in terms of
doing "first things first" and then come back here and ask questions. There
are many requlars around here that will be more that glad to try to help.

Most of us can remember when "just didn' have the probramming skills" but we
have acquired them over time and now we are attempting to help others just
like you because we have received (and by the way we continue to receive)
help from others when we didn't know.

Hang in there, and good luck with your project.

Mr. B
askdoctoraccess dot com
 

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