Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68

    problem to populate child form

    Hi All.


    I have child form has two cascade combo boxes. The Device cascade combo boxes has 3 levels and the Location cascade 5 levels. Only the last level of both cascade combo boxes is bound control. I need help to display values of a record on all controls of the child fRequest form when I open it by double click record on ListBox of the parent fInventory form. Now when I double click record all controls related to Device and Location keep blank. I will appreciate if someone will show how it to do on a sample.
    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    You will probably get more focused advice if you
    -post a copy of what you have
    -provide a plain English description of the "business process(es)" this code is intended to support.

  3. #3
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    Hi orange. Thanks for reply.
    The attached file is my last version of DB.
    Like I mention in first post I would like to pass record from parent form to child form. For that I created double click event in ListBox. But now not all controls in child form are populated when double click executed. I will appreciate if you will show how to fix the problem.
    AddNewCascadeCB.zip
    Thanks

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    When I open your database and fInventory I get this error message??

    Click image for larger version. 

Name:	errror.PNG 
Views:	19 
Size:	99.0 KB 
ID:	47042

    Please provide step by step instructions to highlight the issue/problem.

    Where is qRequest2?

    ?lstRequest.rowsource
    SELECT [qRequest2].[Request_id], [qRequest2].[Date], [qRequest2].[Device], [qRequest2].[Request], [qRequest2].[Amount], [qRequest2].[Location] FROM qRequest2 ORDER BY [Date];

    Are there pieces to this that you haven't told us about?

  5. #5
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    Sorry. I forgot to delete this form. Please, delete f_Inventory form or ignore it for less confuse. And use only fInventory form.
    Last edited by eugzl; 01-12-2022 at 11:22 AM.

  6. #6
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    Sorry. I forgot to delete this form. Please, delete f_Inventory form or ignore it for less confuse. And use only fInventory form.
    Last edited by eugzl; 01-12-2022 at 11:22 AM.

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    I added a new record using fInventory Form and it works just great?

    What is your problem with it??
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  8. #8
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    Hi mike60smart. Thanks for reply.
    I don't have problem to add a new record. My problem is to populate fRequest child form when I double click record on ListBox of the fInventory parent form. Now when I performed double click event on ListBox all combo boxes keep blank when fRequest form populated. What need to do to populate all controls in child form?
    Thanks

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Can you provide step by step of how to highlight your issue?

    I can double click the listbox, but what am I expecting in fRequest?
    If I click other boxes I get errors --- object doesn't exist sort of thing.

    Brand is not a selection in the query/rowsource of listbox so it won't populate the control on fRequest.

    We need specific info from you
    -what do you want to happen when you click on the listbox (please be precise)

  10. #10
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    In my second post I attached file. Please, download it and you will see the problem to populate child fRequest form.
    Thanks

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    I am working with your database. I have deleted form f_Inventory.

    Please respond to my request for detailed instructions to highlight your issue.
    Also, please tell us what controls (specifically) you want populated on that DoubleClick event.

  12. #12
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    255
    Not having figured out how to use the cascaded "Combo Box" controls yet, in the form fRequest you must enter the following event:
    Code:
    Private Sub Form_Current()
        Me.cboBrand = DLookup("BrandID", "tblDevices", "DeviceID = " & Nz(Me.DeviceID, 0))
        Me.cboDeviceType.Requery
        Me.cboDeviceType = DLookup("DeviceTypeID", "tblDevices", "DeviceID = " & Nz(Me.DeviceID, 0))
        Me.cboDevice.Requery
    End Sub
    but you keep making mistake about mistakes, see: in the fRequest there are the cboFacility, cboBuilding, cboWing, cboFloor, cboLocation "Combo Box" controls which make no sense as they do nothing. The Required property is hardly ever used correctly by setting it to Yes where the data is needed.

  13. #13
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi
    I added a table named "tblCurrentRequests"

    Now when you DoubleClick a record from fInventory - fill in the Form for a Request - Save the record it nowgets inserted into tblCurrentRequest.
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  14. #14
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    In the fInventory form has ListBox. I created double click event in the ListBox to open record in the fRequest child form in case if need to update selected record. Now when I try to populate fRequest form all combo boxes on this form don't display data. I would like to fix this problem. As a final result when double click event executed all controls in the fRequest form should be get data from fInventory form.
    Thanks

  15. #15
    eugzl is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    68
    Hi mike60smart. Thanks for try to help.
    I don't have problem to save a new record. My problem is to populate form fRequest from the fInventory parent form.
    Thanks

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 17
    Last Post: 12-28-2021, 01:42 PM
  2. Child Record Created, but won't display in child form
    By CementCarver in forum Programming
    Replies: 1
    Last Post: 04-10-2013, 12:42 PM
  3. Replies: 12
    Last Post: 08-30-2011, 03:36 PM
  4. Problem using Parent/Child Form/Subform
    By EvanRosenlieb in forum Forms
    Replies: 4
    Last Post: 06-27-2011, 05:25 PM
  5. Replies: 2
    Last Post: 06-14-2010, 03:25 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