Results 1 to 5 of 5
  1. #1
    archie1_za is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2017
    Posts
    48

    Alternate Method Of Populating Form Fields Based On Combo Box Selection

    Hi

    On my PO Form :

    Currently I have a Combo Box : PONo_Combo

    The following is the Row source

    SELECT PO.PONo, PO.PODate, PO.POTypeID, PO.POType, PO.ID

    I have a field called PODate on the form where the Control Source =

    =[PONo_Combo].[column](1)




    Everything works fine.

    My question is as follows:

    Is there another way to populate the form instead of going to every fields control source and stipulating the column number? My form will probably end up having about 30 fields and to try and remember each column number or having to keep checking the column number seems a bit inefficient and tedious. I will also end up having many forms where I would need to do the same thing with different info etc... These forms will also have around 30 fields each

    I would assume there are a number of ways of doing this and would welcome knowing them all. Best way to learn and build up the knowledge base


    Thank You.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Don't understand what you are trying to accomplish. You are going to have a combobox RowSource with 30 fields? Never seen anything like this. If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  3. #3
    archie1_za is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    48
    Once again I have maybe explained incorrectly ...oi.... me and access !!!

    I will have a table that has 30 columns/fields. All required information for each record. One of the fields is the PO Number

    I want to display all the fields on the form. When the user selects a specific PO Number from the combo box it must display All the info related to that PO Number in all the fields on the form.

    The reason for my post is considering how many fields I have related to each PO Number (which I cant really get away from) I was hoping to find a better solution.


    .....The there will be cascading Combo boxes in another part of the database.... but that's a topic for another day......

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    There are lots of ways of doing this but they would all start with binding the form to your table with the data in it.

    How you progress from there is dependant on many factors, how big is the underlying dataset in terms of number of records, is it likely to grow to 10s thousands? or just a few hundred if it were filtered down to what would be searched for?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Simplest approach is to bind form to table then use the intrinsic search/filter tools to retrieve existing records. This is basic Access functionality. Anything else will require code (macro or VBA). Review http://allenbrowne.com/ser-62.html
    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. Replies: 5
    Last Post: 05-01-2017, 06:17 AM
  2. Replies: 5
    Last Post: 10-20-2014, 10:32 AM
  3. Replies: 25
    Last Post: 01-25-2013, 10:26 AM
  4. Replies: 1
    Last Post: 02-25-2011, 10:03 AM
  5. Replies: 2
    Last Post: 12-07-2010, 12:32 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