Results 1 to 2 of 2
  1. #1
    pritesharyan is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2015
    Location
    India
    Posts
    32

    Open Subform , Populated with value on Calling form.

    i have Product form,
    on that form i have one button,
    when user click on this button,
    Order form open with new record and Default value
    and OrderSubform Populate with Product, which is currently on Product form.

    Problem is OrderSubform not got focus and how populate OrderSubform with product on product form?

    [I have write below code on OnLoad Event of Order Form]


    Code:
    Private Sub Form_Load()
      Me!OrderSubform.Form!cmbProductID.SetFocus
      DoCmd.GoToRecord , , acNewRec
      
      txtOrderDate.Value = Date
      txtFinishedDate.Value = Date
      txtRequiredDate.Value = Date
      cmbCustomer.Value = 1
      cmbEmployee.Value = 1
    End Sub
    Product form.
    what i have tried => [here Download Project]

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    Since the subForm is a child record,you cannot populate until you save the master record.
    Save the Master record. THEN you can add child records.

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

Similar Threads

  1. Replies: 11
    Last Post: 11-25-2013, 01:46 PM
  2. Calling a subform based on a condition
    By msmithtlh in forum Forms
    Replies: 6
    Last Post: 03-18-2013, 03:19 PM
  3. Replies: 3
    Last Post: 08-26-2012, 10:04 PM
  4. Replies: 5
    Last Post: 10-28-2011, 02:42 PM
  5. Calling A Module Function To Open A Form
    By orcinus in forum Modules
    Replies: 3
    Last Post: 09-29-2010, 04:43 PM

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