Results 1 to 6 of 6
  1. #1
    renovator is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2016
    Posts
    7

    Variable Child forms

    Good Day,


    I am doing a simple file management database, BUT my friend wants different fields filled in based on the category of file (Where category is not the same as a file type such as ppt) such as journal article or a book or a case or a presentation

    1. user browses the file system and adds a file hyperlink
    2. they use the "category" field and set it to = journal article or a book or....
    3. based on the category field I need data filled in - some is the same for all of them but mostly it is different, For each category I have a different file,

    The options I have come up with are
    4.1 a sub form to appear for each category type
    OR
    4.2 a sub form which shows all the fields for all the categories, but stops entry into fields that are not valid for the category
    OR
    4.3 I had normalized all the data BUT the user wants to search all the fields so I am not sure whether I should just reuse the fields for differnet purposes to cut down the number of fields he has to search for

    regards Renovator

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Before worrying about how to build the form, you need to decide how to store the data. Do you have your tables and their relationships defined? Perhaps adding some attributes to an entity or two will be the solution to your problem.

  3. #3
    renovator is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2016
    Posts
    7
    Hi ItsMe,
    I have the structure and ended up with a tab for each category that showed the file details and a subform for the data unique to the category eg for Journal (journal name, date, page number, author). My friend didn't like that as he wanted to
    1/ browse and choose a file then
    2/ display the file
    3/ and decide the category
    4/ choose the category eg journal
    5/ enter the data (journal name, date, page number, author)

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps you can provide a diagram of the table structure. In order to offer advice, we would need to know actual names of tables, columns, the Keys and where the Foreign Keys are.

  5. #5
    renovator is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2016
    Posts
    7
    Quote Originally Posted by ItsMe View Post
    Perhaps you can provide a diagram of the table structure. In order to offer advice, we would need to know actual names of tables, columns, the Keys and where the Foreign Keys are.
    Click image for larger version. 

Name:	capture 2.jpg 
Views:	10 
Size:	129.6 KB 
ID:	25773
    hi,
    there are 5 types of files
    Doc_CaseLaw
    Doc_Advice
    Doc_Seminar
    Doc_Regulation
    Doc_NonCaselaw

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I would probably use different forms for different scenarios. Code would determine which form to use for the Subfrom Control's Source Object. I would create a custom search function that would consider the appropriate table to use based on the entity selected.

    I would likely use Enumeration types and custom functions in a Standard Module. These functions would support assigning different Objects to different scenarios. The Enumeration would support strongly typed code within my form modules. For instance, one of the functions could return a table def instantiated as one of the options from the Enumeration.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-05-2014, 03:26 PM
  2. Replies: 1
    Last Post: 09-03-2014, 01:36 PM
  3. Replies: 1
    Last Post: 03-21-2014, 06:17 AM
  4. Master/Child Link between Forms/Subforms
    By Stephanie53 in forum Forms
    Replies: 2
    Last Post: 04-02-2013, 08:14 PM
  5. Replies: 1
    Last Post: 01-04-2011, 05:04 AM

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