1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

reset TextBoxes and ComboBoxes after a certain date

Discussion in 'Business Applications' started by ncvet007, Jan 28, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    This is Access 2010 for a boarding kennel. I have a Form used to fill out for customers (who will be coming in on a repeat basis). Some of the information in the Form will be applicable for that visit
    only. I have a Form and Subform. The Form has 2 TextBoxes (one for date for arrival and one for date of departure) and a ComboBox with lists. The Subform has 2 ComboBoxes with lists. When the date of departure is less that today's date, I want the entries in the TextBoxes and the ComboBoxes to automatically be emptied and ready for an entry on the next visit. How do I accomplish this?
    Thanks
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    ncvet007, welcome to the Forum.
    It is not noraml to "reset" the data, because you overwrite the old data and therefore lose the history.
    It is more normal to put the changing data in to a subtable and use a Subform thereby maintianing the history by adding a new record in to the subform for each new visit.
     
  3. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    Let's say an owner has 3 dogs and one needs grooming this visit. I have subform which lists each dog separately. One of the fields has a drop down list of "blank", "bath" or 'grooming". If dog 1 needs grooming this visit but not the next visit, the user will have to pick "blank" from the list on the next visit. This why I want the list blank so the record doesn't have "grooming" in that field on the next visit and the user forgets to update it. Does this make sense?
     
  4. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Sorry, it still sounds as if you are overwriting the same record each time you make an entry. But if you are happy with that I can supply the code you need.
    I would need to know the exact names of the fields and combo.
     
  5. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    That sounds great. I had to leave town and my laptop doesn't have Access so I'll wait until Wed when I get back to give you the exact names. Thanks so much
     
  6. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    A million apologies for being late. The Form has "DateArrival" and "DateDeparture" TextBoxes and a "BathGroomComboBox" . The subform has a "DayCareBoardComboBox".
    Thank you.
     
  7. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    It also sounds like the relationships in your tables have not been well defined. You should have something like a customer table a dog/client table and an appointments table. A coustomer can have many pets and a single pet can have many appointments. You would want each appointment to always keep its information and not overwrite it say when an appointment is over.
     
  8. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Rockn, I agree completely.
     
  9. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    As long as the data is in it's respective table you can display it any way you want on a form or a report. I do not think what you want to do will work anyway unless the sub-form were to be refreshed constantly.
     
  10. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    I do have a customer table (linked to the form) and a dog table (linked to the subform) but I don't have an appointments table. I want the customer table and the dog table to always save the information but I don't think I want the appointment information for any future needs? I'll only use the current appointment information for the current visit and then start anew the next visit. Does that sound right?
     
  11. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Don't you want to see some sort of appointment history for billing or other purposes? That information could be very useful to a business I would think.
     
  12. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    I'm going to use QuickBooks for the accounting. Not being a programmer, I was originally using Access with owner and dog databases for information retrieval only. Then I tried to morph it into possibly doing other things like the services provided each visit. pictures of the pets, etc. Is it easier to use an appointment table and save the information than to rewrite over it? There's no harm in saving the data as it may/not be useful but will always be available for later retrieval. If so, how would the appointment table be set up?
     
  13. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    You would set up an appointment table with related fields to other tables like the pet table. The pet table reference in the appointment table would be the primary key from the pet table. Every time a new appointment is made the primary key for that pet gets updated with that pets PK along with any other information that applies to the given appoint ment like a start & stop time, service rendered, etc., etc.

    There is a bit more involved with creating the form to enter the appointment data, but once it is all set up it should make things far easier and your info will be cleaner.
     
  14. ncvet007

    ncvet007 Thread Starter

    Joined:
    Jan 28, 2011
    Messages:
    74
    Thanks for the help. I'll give it a try.
     
  15. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Not a problem.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/977511

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice