Results 1 to 11 of 11
  1. #1
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32

    Populate Existing form from Query ?


    Good Day everyone,

    Is it possible to populate an existing form from a query in a database. A little explanation I have a database with 2 linked tables that stores different information. I want to be able to create a query based on Date or lets say Project Name and have the query results populate that form for printing or later view.
    would I have to recreate the form as a copy or can it use the original form and populate the data in that form?

    thanks in advance for your time

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    Your Form can be based on either the Table or a Query based on the table.

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi
    Can you upload a zipped copy of the database so we can see the structure of your tables?

  4. #4
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32

    Zipped copy

    Quote Originally Posted by mike60smart View Post
    Hi
    Can you upload a zipped copy of the database so we can see the structure of your tables?
    the file is 1.39 gigs just the structure alone is there another way?
    Last edited by rshaw63; 06-28-2021 at 12:57 PM. Reason: Attachment too large

  5. #5
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32
    I think maybe a better question would be how do i link that form in a query to populate matching information from the tables? That brings up another good question since my form stores so much information i had to break it up into 2 tables so i think i would have to have both tables tied to the query to repopulate that form that is created correct?

  6. #6
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32
    I have a query that finds the information i want however i need it to populate this form


    Click image for larger version. 

Name:	Capture.PNG 
Views:	9 
Size:	43.6 KB 
ID:	45586 left the query that locates information i want

    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	59.0 KB 
ID:	45588 Existing form i want to repopulate using above query results

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,558
    Set the form recordsource to your query
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32

    Thanks

    Thank you Mike So Much I figured it out it works exactly like i want it to now.

    I modified the query to include all fields from both tables on that form, created a copy of the original form and pointed the datasource to that new copy and removed edit, add, delete permissions for that form.

  9. #9
    rshaw63 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Posts
    32
    thank you that did it !!! Have a great Day

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,558
    I would have used the one form?
    If you need to add/remove a control etc, now you have to do it in two places?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  11. #11
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    I think you have a problem with the structure of your Form

    This section looks wrong.

    It looks like you are typing in the values

    Are these fields in your Main Form table?

    They should I believe be fields in a related Table.
    Attached Thumbnails Attached Thumbnails Subform.JPG  

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

Similar Threads

  1. Replies: 2
    Last Post: 05-17-2017, 06:17 AM
  2. Replies: 29
    Last Post: 04-25-2014, 03:49 PM
  3. Replies: 7
    Last Post: 04-01-2014, 02:08 PM
  4. Replies: 4
    Last Post: 02-07-2012, 12:16 PM
  5. Populate existing records from Excel
    By oleBucky in forum Import/Export Data
    Replies: 2
    Last Post: 03-08-2011, 12:23 AM

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