Results 1 to 6 of 6
  1. #1
    zooyo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    12

    Pre-population of fields within a form

    Hey everyone!

    I have a question regarding a subform within a form (although I am not so sure this matters but worth sharing). So I have a few fields within the subform that I would like to have pre-populate every time a new record is inserted.

    Here is the long and short of it. I work in healthcare and I have a table that that contains Doctors information, the regions they work out of, and it tracks our representative's visits.

    I need to have the region they work in pre-populate into the form every time a new record is inserted. Is there anyway to do that?

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I'm sure there may be a way, but please describe in more detail. It would be helpful if you could give a sample with data of how you see this working. There may be options to get the result you want.

  3. #3
    zooyo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    12
    Sure thing. Here is a sample of what I am working with -

    Provider Name Provider ID Date Seen Region
    Smith 123456 1/30/14 Mid Atlantic

    Within the form there is a button that will insert a new record. Currently it will insert a blank form. I would ideally want this to pre-populate the Provider Name, Provider ID and the Region. And the Date Seen category would be blank to allow for new data to be recorded.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I recommend you don't use field names that have embedded spaces or special characters. Use only these chars for field and object names A-Z, 0-9 and _. This will save you a lot of syntax errors.

    When you say pre-populate -- where would this list of names/values come from? Are these records from a given table and you are processing all records 1 at a time?
    Based on your posts I see a scenario:

    The Representative visits the Region to contact Doctors. The whole thing is to create a record indicating this rep saw this Doctor in this Region on DateX.
    What tables do you have? What are the designs/fields?

  5. #5
    zooyo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    12
    I have 2 tables. One hold basic information for all the Docs(sheet1) and the other simply is a running list of visits(sheet2). When I created the button to add a new record on the sub form the ID automatically carried over. I don't know how. All I did was create the button to Add Record and the ID carried over but nothing else.

    So back to your original question the list of names and values comes from sheet2.

    Its hard to explain in too much detail simply because of confidentiality. As sharing any print screens or specific information would result in my termination. I'm almost ready to scrap this idea and try something else. Its something so simple but for whatever reason its borderline impossible to tool around with and figure out. Been looking at this for hours.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Subform saves the provider ID because of Master/Child Links properties of the subform container control.

    I presume each provider can be associated with only one region.

    Don't have a table of Reps?

    Do not save provider name and region into Visits, only provider ID.

    Options for form data entry/edit.

    1. one form bound to Visits with comboboxes to select provider and rep

    2. main form bound to Providers and subform bound to Visits with a combobox in subform to select rep

    3. main form bound to Reps and subform bound to Visits with a combobox in subform to select provider
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Auto population
    By Andyjones in forum Queries
    Replies: 5
    Last Post: 11-26-2011, 07:29 PM
  2. Form pre-population help
    By tmcrouse in forum Forms
    Replies: 4
    Last Post: 08-02-2010, 09:45 AM
  3. Population by query
    By Eviscerator in forum Forms
    Replies: 1
    Last Post: 06-10-2010, 05:43 PM
  4. Form Auto population
    By Evgeny in forum Forms
    Replies: 28
    Last Post: 04-12-2010, 03:05 PM
  5. Form Auto population
    By Evgeny in forum Access
    Replies: 3
    Last Post: 04-08-2010, 05:17 PM

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