Results 1 to 13 of 13
  1. #1
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107

    AutoFill, Relationship, Form, Control Issues

    I have a Task Form. In the form I have several different tasks.

    I then have a TabControl with Personnel, Equipment and Tools.

    In the Personnel, Equipment and Tools SubForms I am trying to get several text fields to AutoFill when I pick a given Person, Piece of Equipment or Tool and have them assigned to only that one task.

    The database will be used on computers without Access so I have to use the RunTime App for MS which does not allow VBA...

    So can the above process happen without code and... why can I not get the subforms to connect to One task rather than all tasks???

    Task - Tbl

    TaskID
    PersonnelID
    EquipmentID
    ToolsID
    WorkOrderNumber
    WODate
    Description
    Building
    Floor


    Department
    Room
    ContactPerson
    ContactNumber

    Personnel - Tbl

    PersonnelID
    TaskID
    EmpolymentDate
    LastName
    FirstName
    JobDescription
    Seniority
    PayRate
    BillRate

    Equipment - Tbl

    EquipmentID
    TaskID
    Type
    Size
    Weight
    Location
    Quantity
    Hours
    VinNumber
    Restrictions
    Permits

    Tools - Tbl

    ToolsID
    TaskID
    Type
    Description
    AssignedTo
    Location

    Click image for larger version. 

Name:	Tasks.jpg 
Views:	17 
Size:	137.8 KB 
ID:	26294Click image for larger version. 

Name:	Equipment Tab.jpg 
Views:	17 
Size:	143.8 KB 
ID:	26293Click image for larger version. 

Name:	Tools.jpg 
Views:	17 
Size:	136.4 KB 
ID:	26292

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    The database will be used on computers without Access so I have to use the RunTime App for MS which does not allow VBA...
    not true. VBA can be used, but runtime users will not have access to the ribbon, navigation pane or shortcut menus. By the same token they will not be able to go into the design or layout view for tables, queries, forms, reports of modules. If you need them to have this functionality, you need to develop your own equivalents.

  3. #3
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by Ajax View Post
    not true. VBA can be used, but runtime users will not have access to the ribbon, navigation pane or shortcut menus. By the same token they will not be able to go into the design or layout view for tables, queries, forms, reports of modules. If you need them to have this functionality, you need to develop your own equivalents.
    So RunTime will run VBA code?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    So RunTime will run VBA code?
    yes - if you want to know what it looks like, change the name of your access file extension to .accdr and then open it to imitate a runtime environment. Note you will have to specify an navigation form or login form (in file>options>current database - display form) or create an autoexec macro to open a form since users cannot choose from the navigation window

  5. #5
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by Ajax View Post
    yes - if you want to know what it looks like, change the name of your access file extension to .accdr and then open it to imitate a runtime environment. Note you will have to specify an navigation form or login form (in file>options>current database - display form) or create an autoexec macro to open a form since users cannot choose from the navigation window
    I didn't know that. I've been having a tough time finding computers without access to test RunTime on. So if I just publish the database in .accdr it will work as if I'm running on RunTime and can test it that way?

  6. #6
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Also... Would DLookUp be the route to go for those AutoFill Fields?

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    So if I just publish the database in .accdr it will work as if I'm running on RunTime and can test it that way?
    no need to publish, just change the file extension. You can then change it back again to edit the file
    Also... Would DLookUp be the route to go for those AutoFill Fields?
    it's one way to go, but without a full understanding of what you are trying to do I can't say it is the best way.

    your tables don't look right to me. For example - why have you got taskID in all the tables? have you defined relationships - if so, what are they? one to many? many to many? one to one?

  8. #8
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by Ajax View Post


    your tables don't look right to me. For example - why have you got taskID in all the tables? have you defined relationships - if so, what are they? one to many? many to many? one to one?

    LOL... It's highly possible my tables are wrong. I want ONE Task with MANY Personnel assigned to it with MANY pieces of Equipment and Tools assigned to that ONE task as well.

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    Unless personnel are only used for one task, and one task only, you have a many to many relationship, not a one to many.

    Assuming you mean many to many you need

    table for tasks
    table for personnel
    table for equipment
    table for tools

    plus joining tables

    tasks>personnel
    tasks>equipment
    tasks>tools

    using tasks/personnel as an example

    tblTasks
    TaskPK
    WorkOrderNumber
    WODate
    Description
    Building
    Floor
    Department
    Room
    ContactPerson
    ContactNumber

    tblPersonnel
    PersonnelPK
    EmpolymentDate
    LastName
    FirstName
    JobDescription
    Seniority
    PayRate
    BillRate

    tblTaskPersonnel
    TaskPersonnePK autonumber
    TaskFK long
    PersonnelFK long
    you might need additional fields in this table such as dates to start/finish tasks

  10. #10
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Thanks Ajax...

    I'm with you on the PK = Primary Key.

    But what is FK Long?

  11. #11
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    FK=Foreign (or Family) Key

  12. #12
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by Ajax View Post
    FK=Foreign (or Family) Key
    I'm not familiar with this one. Is this to be used for the relationship connection?

    Sorry Ajax... I can be kinda thick sometimes.

  13. #13
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    Primary Key uniquely identifies a record, Foreign Key is a field in another table which references back to the primary key.

    I use the PK and FK suffix so I know which end of a relationship the field belongs. Many will use the same suffix (e.g. ID)

    Recommend you do some googling on relationships, normalisation and database design before going any further.

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

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2014, 08:43 PM
  2. Replies: 17
    Last Post: 08-21-2013, 12:52 PM
  3. Relationship Issues
    By MTSPEER in forum Access
    Replies: 6
    Last Post: 06-05-2013, 01:01 PM
  4. Relationship Issues?
    By RatBronco in forum Access
    Replies: 3
    Last Post: 12-30-2012, 01:58 PM
  5. Form Design / Relationship Issues
    By brharrii in forum Forms
    Replies: 5
    Last Post: 06-23-2012, 11:37 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