Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Form Formatting (Access 2K)

    I have a form that sorts data in chronological order. There are three things I would like to accomplish in VBA to modify the appearance of this form.

    1. I would like the form to display the same record based on an assigned value. This value will come from the field strManualNurseCount. If strManualNurseCount
    Easy Access

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Formatting (Access 2K)

    1. Why do you give a number field prefix str?
    Why do you want to display a single record multiple times? Even if it is possible, it will still be a single record, all copies will display exactly the same data, and the form would either become read-only, or a change to one of the copies of a record would immediately be reflected in the others.

    2. This won't be easy.

    3. This can be done using conditional formatting.

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Form Formatting (Access 2K)

    1. Sorry Hans, but I inherited this project. Someone else made this database up and I just didn't have the time to go through the whole database and change it.
    This is basically part of a scheduling database that the person scheduling has multiple persons to schedule to each clinic. She wants to be able to see occurances based on the number people she must schedule at each clinic, so if 1 is "blank"out of 3, she knows she still has to schedule 1 more.

    2. If it would be really difficult then I can understand. I would hoping there was some code that could be easily written using a looping process.

    3. If you could assist me with the conditional formatting for this item it would be much appreciated.
    Easy Access

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Formatting (Access 2K)

    1. You wrote
    <hr>She wants to be able to see occurances based on the number people she must schedule at each clinic, so if 1 is "blank"out of 3, she knows she still has to schedule 1 more.<hr>
    Does that mean that the user needs to be able to enter different data in the "copies"? If so, your original question "I would like the form to display the same record based on an assigned value" was misleading - you actually need physically different records.

    3. See attached version. I changed the name of the check box bound to chkTenative, and set a conditional format on the text boxes and combo box depending on the chlTenative field. (If the name of the control is the same as that of the field, the conditional formatting will act the same for all displayed records)

  5. #5
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Form Formatting (Access 2K)

    Hello Hans,
    Thank you for the assistance on the conditional formatting. <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> I apologize for any ambiguity in my previous explanation. <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

    The desire is for each clinic record to be displayed on the form as many times as there are nurses to be scheduled (strManualNurseCount); therefore the 1 to many relationship between tblEmployee and tblScheduledEmployees.

    I will await your response on this. If the alternating color is too difficult, I understand.
    Easy Access

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Formatting (Access 2K)

    I'm still not sure whether you want the same record to be displayed multiple times, or whether you want to create multiple records.

  7. #7
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Form Formatting (Access 2K)

    Again I apologize for being unclear. The data for each record on the form comes from 2 tables; tblSchedule and tblScheduledEmployees. Based on the 1 to many relationship, logically I assume that I would want to create multiple records in tblScheduledEmployees that woud be linked to each record in tblSchedule predicated by the number in strManualNurseCount.
    Easy Access

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Formatting (Access 2K)

    Merely entering a number in a field doesn't make Access create records automatically. You will have to add the records manually, since a record in tblScheduledEmployees requires a value in tblEmployees (because the relationship between the tables enforces referential integrity). Once you have done that, I would stop using the strManualNurseCount field, and add records to tblScheduledEmployees as needed.

  9. #9
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Form Formatting (Access 2K)

    Would it be possible to format a query or VBA that would create the desired number of records in tblScheduledEmployees each time a new record is created in tblSchedule based on the field strManualNurseCount?
    Easy Access

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Formatting (Access 2K)

    Only if you are able to specify the EmployeeID for each record to be created.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •