Results 1 to 4 of 4
  1. #1
    banno1 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    5

    Autofill a Subform using a short text box

    Hi



    First post - thank you in advance for any help you are able to give. I think I need some help with VBA coding.

    I work in a hospital and have created a database for patient waiting list forms, I would also like to use this as a patient database. Some patients may be listed on the waiting list 2+ times therefore may have multiple waiting list forms. I intend to make a subform for the "patient details" section of the form as this will be a one to many relationship with the waiting list forms.

    Each patient is coded in the hospital by a unique identifying number, is there any way to auto fill the rest of the patient details if they have already been inputted before (i.e. forename, surname, d.o.b., address etc) on the sub form once the unique identifying number has been input?

    Thank you so much for any help you are able to give.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    To achieve the results you require, as I understand them, you would at least need a table for patient details and a table for waiting lists which would have a one to many relationship. One patient possibly being on more than one waiting list. This would usually be done by having the primary key value in the patients table replicated in the waiting list table. The details from the patient table would be displayed in a main form and the related records in the waiting list table would be displayed on the main form, within a sub form. The replication of the patients primary key value would be made automatically by access as each new record is created on the sub form.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    banno1 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    5
    Fantastic - thank you so much! Sorry for the basic question!

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by banno1 View Post
    Fantastic - thank you so much! Sorry for the basic question!
    No problem. Glad to be able to help ☺
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Converting Hyperlink field back to short text
    By gksmith5 in forum Access
    Replies: 3
    Last Post: 06-02-2018, 01:19 AM
  2. Replies: 1
    Last Post: 04-04-2017, 05:50 PM
  3. Replies: 1
    Last Post: 05-18-2016, 09:46 AM
  4. Convert Short text column to date ms access
    By SameerSarswat in forum Access
    Replies: 3
    Last Post: 10-09-2014, 10:42 AM
  5. Predictive Text in short text
    By lonesoac0 in forum Access
    Replies: 1
    Last Post: 08-27-2014, 10:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums