• Single form/multiple users

    Author
    Topic
    #353963

    I have multiple teachers who need to enter contact information such as how many contact hours, date, what they did, etc. into the database which then spits out statistics for the month for us to keep track of how many hours they work with clients so that we could bill our funding agencies.

    The original database currently has 10 identical forms, with Teacher field set to default # for each teacher.
    (1 = Mr John Doe, 2 = Mrs. Jane Doe, etc)so that teachers wouldn’t have to select their name in order to link their name to the current record each time they enter a new record.

    This worked OK for a while…However, now each time I make a change to one form, I have to do the same changes for other 9 forms. To compound the issue further, I’m interested in programming a code that would automatically add a new client name if not in list. This code won’t work because I’d need to create 10 identical code, each code being assigned to each teacher’s form.

    I was thinking — Would it be remotely possible to code the switchboard to automatically assign teacher’s ID to single form when the teacher presses the button that has that teacher’s name?

    If possible, then I need to know what the code should look like and keep in mind — A teacher could enter multiple records during a single session. All records must have teacher ID assigned to each record.

    Thanks!

    Viewing 0 reply threads
    Author
    Replies
    • #519059

      Hi Brent,
      One way you could do what you want would be to have the Teacher names (and IDs) in a combobox on your form and have some code attached to the afterupdate event of the combobox to set the default value of the combobox to be that name (or ID):
      Me!cboComboboxName.DefaultValue = Me!cboComboboxName.Value
      which will then be retained for new records.
      Does that help?

    Viewing 0 reply threads
    Reply To: Single form/multiple users

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: