Page 5 of 5 FirstFirst 12345
Results 61 to 70 of 70

Parent and subform Linking issue

  1. #61
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    7,459
    Posts #56 & #57 have invalid attachments.

    is this the info you are referring to when ask to post database?
    No, I was asking about the actual dB. Do a "Compact & Repair" then Zip it.
    In a reply, click on the "Go Advanced" button.


    Then scroll down to the "Manage Attachments" button.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  2. #62
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Quote Originally Posted by ssanfu View Post
    Posts #56 & #57 have invalid attachments.


    No, I was asking about the actual dB. Do a "Compact & Repair" then Zip it.
    In a reply, click on the "Go Advanced" button.
    Then scroll down to the "Manage Attachments" button.
    ok ill try my best to upload it
    Attached Thumbnails Attached Thumbnails Job6.jpg   Job5.jpg  

  3. #63
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Quote Originally Posted by ssanfu View Post
    Posts #56 & #57 have invalid attachments.


    No, I was asking about the actual dB. Do a "Compact & Repair" then Zip it.
    In a reply, click on the "Go Advanced" button.
    Then scroll down to the "Manage Attachments" button.
    database attached bud
    Attached Files Attached Files

  4. #64
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    7,459
    The click event of your open button is a macro. (I NEVER use macros)
    It looks like the macro command to open a form does not have the capability to have a parameter to pass values as an "OpenArgs".

    If you converted the macro to code, it would look like
    Code:
    '------------------------------------------------------------
    ' Order_Entry_Click
    '
    '------------------------------------------------------------
    Private Sub Order_Entry_Click()
        On Error GoTo Order_Entry_Click_Err
    
        DoCmd.OpenForm "Order_Form", acNormal, , , , , Me.Job_No 'OpenArgs parameter
    
    Order_Entry_Click_Exit:
        Exit Sub
    
    Order_Entry_Click_Err:
        MsgBox Err.Number & ": " & Err.Description & " (" & Erl & ")"
        Resume Order_Entry_Click_Exit
    
    End Sub

    -------------------------------------------------------------------------------
    Edit: just saw you have look up FIELDS in several tables.
    Most experienced Access programmers DO NOT use Look up FIELDS.
    See
    The Evils of Lookup Fields in Tables
    http://access.mvps.org/access/lookupfields.htm
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  5. #65
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Quote Originally Posted by ssanfu View Post
    The click event of your open button is a macro. (I NEVER use macros)
    It looks like the macro command to open a form does not have the capability to have a parameter to pass values as an "OpenArgs".

    If you converted the macro to code, it would look like
    Code:
    '------------------------------------------------------------
    ' Order_Entry_Click
    '
    '------------------------------------------------------------
    Private Sub Order_Entry_Click()
        On Error GoTo Order_Entry_Click_Err
    
        DoCmd.OpenForm "Order_Form", acNormal, , , , , Me.Job_No 'OpenArgs parameter
    
    Order_Entry_Click_Exit:
        Exit Sub
    
    Order_Entry_Click_Err:
        MsgBox Err.Number & ": " & Err.Description & " (" & Erl & ")"
        Resume Order_Entry_Click_Exit
    
    End Sub

    -------------------------------------------------------------------------------
    Edit: just saw you have look up FIELDS in several tables.
    Most experienced Access programmers DO NOT use Look up FIELDS.
    See
    The Evils of Lookup Fields in Tables
    http://access.mvps.org/access/lookupfields.htm
    cheers,

    as my coding is up shit creek... I tend to go for easy option macros lol

    I entered the code in vba, when I click the button the Order Entry page doesn't load up, has no error messages either

  6. #66
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    7,459
    There are errors in the Form Open event of the "Order_Form".

    "Line" is a reserved word and the field doesn't exist in the form "Order_Form".

    The line of code
    Code:
    Me![1] = Nz(DMax("Line", "Orders", "Job_No = " & [Line]), 0) + 1
    is invalid.



    Also, "Date_Ordered" is not in the record set for the same form.

    I'll have to look at it tomorrow - have to go to class and beat up some 5 year olds......
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  7. #67
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Yeah right... ill have a sus and change that name!

    To easy mate cheers for the help today, haha have fun with the beatings! 😂

  8. #68
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Click image for larger version. 

Name:	2.jpg 
Views:	12 
Size:	81.5 KB 
ID:	32115Click image for larger version. 

Name:	1.jpg 
Views:	12 
Size:	109.7 KB 
ID:	32114

    Using Access 2010 at home I manage to get the Where Condition that I was talking about yesterday.... this is what I had in the first place, would you still stick to VBA or will this be sufficient?

    do I still use the same VBA John supplied to Insert the Order_No?

    The Builder Table you suggested Steve was a good idea, it just took me awhile to get my head around it.. lol

    the only reason I have lookup tables is so people don't have to do to much typing.... is there another option to get me the same out come without lookup?

  9. #69
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    7,459
    Still a little off on the tables/relationships...
    This is how I would design the tables (realizing I don't know your requirements)
    Click image for larger version. 

Name:	Relationship3.png 
Views:	11 
Size:	155.8 KB 
ID:	32126
    (I used my naming conventions)


    I would suggest you WORK through (not just look at, actually do them) these tutorials at "RogersAccessLibrary" site.

    I did a lot of mods to your dB. Well, as much as I could without knowing where you were headed/what you wanted. Tear it apart to see what I did....

    I also attached a text file with a lot of sites about designing dBs, for you to visit
    Attached Files Attached Files
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  10. #70
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    166
    Quote Originally Posted by ssanfu View Post
    Still a little off on the tables/relationships...
    This is how I would design the tables (realizing I don't know your requirements)

    (I used my naming conventions)


    I would suggest you WORK through (not just look at, actually do them) these tutorials at "RogersAccessLibrary" site.

    I did a lot of mods to your dB. Well, as much as I could without knowing where you were headed/what you wanted. Tear it apart to see what I did....

    I also attached a text file with a lot of sites about designing dBs, for you to visit
    I will have a good look at it.... my back ground in database and vba has been self taught from Google search lol, so I Appreciate all the effort mate. thanks a lot for the database!

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Linking Subform to Form issue
    By dweekley in forum Forms
    Replies: 9
    Last Post: 04-28-2017, 05:44 PM
  2. Linking Parent ID Autonumber with subform
    By banpreet in forum Forms
    Replies: 5
    Last Post: 12-19-2016, 01:54 PM
  3. Replies: 1
    Last Post: 10-04-2016, 03:29 PM
  4. Subform linking issue
    By buckwheat in forum Access
    Replies: 3
    Last Post: 08-28-2013, 12:53 PM
  5. SubForm to Parent
    By henryclay in forum Forms
    Replies: 2
    Last Post: 11-15-2006, 08:44 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
  •  
Tech Forums: Microsoft Office Forums