Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Single form/multiple users

    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!

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Single form/multiple users

    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?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Lounger
    Join Date
    Feb 2001
    Location
    TX, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Single form/multiple users

    or he could pass the teacherid in the openargs parameter

Posting Permissions

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