Results 1 to 7 of 7
  1. #1
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62

    Red face Please help to add new data to a subform?

    Subform Click image for larger version. 

Name:	subform.jpg 
Views:	16 
Size:	116.1 KB 
ID:	36414 fill out form for posting of billClick image for larger version. 

Name:	pop-up.jpg 
Views:	16 
Size:	54.8 KB 
ID:	36415
    This is my billing form which I would like to design to be updated and add data by clicking on a hyperlink, and it would opens a form, that i would fill the info/data to be billed. please help me how to properly add new data to the current account, when it opens.

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    This requires code to pass account number to the popup form. If you want to avoid that, enter billing info into subform instead of a popup.
    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
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    I would like to make/ fill the data in other form, so it will not be easily edited or deleted,I think?

  4. #4
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    can help me with the code sir?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    So those records I see in your subform are locked against editing?

    Okay, code can be like:

    DoCmd.OpenForm "Post_Billing_Form", , , , acFormAdd, , Me.CustomerID

    The trick will be figuring out what event to put that line in.

    Then code behind the popup form.

    Code:
    Private Sub Form_Load()
    If Me.NewRecord Then
        Me.CustomerID = Me.OpenArgs
    End If
    End Sub
    I am only guessing about the names for the primary and foreign key fields that link these tables. Adjust as needed.

    Advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention. Better would be AccountNum or AccountNo or AcctNum.
    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.

  6. #6
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62
    Tried it sir/mam, but it did not respond or opens the form.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    Why not post a copy of the database so readers can see your table(s) and relationships, and the code involved?

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

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2017, 05:20 PM
  2. Replies: 2
    Last Post: 11-16-2016, 12:16 AM
  3. Replies: 5
    Last Post: 08-12-2013, 12:53 AM
  4. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  5. Replies: 4
    Last Post: 04-07-2011, 03:39 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