Page 3 of 3 FirstFirst 123
Results 31 to 36 of 36
  1. #31
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by raychow22 View Post
    So if I were use tblLocations and tblInspections as the data entry for my tblInspectionForm. The data would go to those locations instead of tblInspectionTable (linking them to the specific DIRID associated for that record)?
    If this is what you are asking
    Click image for larger version. 

Name:	Related.png 
Views:	22 
Size:	7.0 KB 
ID:	44604
    then, Yes.



    I figured out that DIRID_PK (DIR) could be Daily Inspection Report.
    Haven't figured out what QEIID_FK (QEI) stands for.



    You really haven't told us much about the design..... which, after looking at the form, brings up a lot of questions about the dB design for me.

    So for one record (one Daily Inspection report):
    How many Inspectors can there be?
    Is the start time and end time the same for all Inspectors?
    How many Subcontractors are/can be involved?
    Can there be/are there more than one Specification? the label says "Specification(s)".


    There are 4 Location controls. One inspection (DIR) covers up to 4 locations?
    How many DeficiencyTypes can there be? For each Location? Or for this record (DIR)?



    I don't know your process or requirements, but did you design the dB structure on paper or do an analysis first? It is hard to go from a paper form, to moving it to a computer/database and capturing the required data. Maybe something to think about...

    time....

  2. #32
    raychow22 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    145
    ssanfu,

    Thanks for that. I do want to use a subform to capture multivalue data (0-3 entries of some combo list) for each record of a DIR (Daily Inspection Report). I noticed that when I try to select a entry in the subform and then delete (leaving it blank); the record inspectiontype is still recorded but just a blank record; how do I eliminate that?

    See below




    Attached Thumbnails Attached Thumbnails Capture.JPG  

  3. #33
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You don't delete the record by leaving the combo blank, you need to actually delete the record by clicking on the record selector on the left and pressing the Delete key.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #34
    raychow22 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    145
    Vlad,

    Thanks. I did that. Is there a way to make the selection of InspectionType for each unique InspectionReport(DIR) to not repeat itself ( in other words No Duplicates )?

  5. #35
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Yes, you can add validation in the BeforeUpdate event of the form to check if the combo's value already exists for that inspection report:

    Code:
    If dcount("*","tblInspections","[DIRID_FK]=" & Me.DirID_FK)> 0 then msgbox "AlreadyExists":Cancel=True:Exit Sub
    Or probably better you can edit the row source of the combo by changing it into an unmatched query so it does not list the values already selected for the current DIRID (you need to requery the combo in the Enter or GotFocus event of the combo itself).

    Upload a sample if you get stuck.

    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #36
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    never mind me - somehow I was way out of sync.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 10-24-2018, 04:37 AM
  2. Replies: 20
    Last Post: 01-09-2017, 12:08 AM
  3. Help allocating Primary/Foreign Keys and Relationships
    By rosscortb in forum Database Design
    Replies: 2
    Last Post: 07-08-2015, 08:12 AM
  4. Replies: 11
    Last Post: 06-11-2012, 12:23 AM
  5. Primary/foreign keys + relationships
    By tripptofer in forum Database Design
    Replies: 0
    Last Post: 08-12-2009, 07:44 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