Results 1 to 4 of 4
  1. #1
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31

    open other forms as subform rather than seperate form on the basis on combo selection

    i am a very novice user and just two weeks before start working on Access.
    i am making some data input form.


    i have a main form and then i have some connected forms with that..
    on the basis of selection of combo box i can open the connected forms .
    But i want the things that they should open in the main form on the right.
    i have only two fields on main form and i want to populate rest from sub form.

    this is the VB code how i can open connect the new forms on the basis of combo selection from main form.
    "
    Private Sub Service_AfterUpdate()
    Dim strForm As String


    If Me.Service = "Airsure" Then
    strForm = "Airsure_input"
    ElseIf Me.Service = "AirsureAdditionalCompensation" Then
    strForm = "AirsureAdditionalCompensation_input"
    ElseIf Me.Service = "BFPO_LargeLetter" Then
    strForm = "BFPO_LL_input"


    ElseIf Me.Service = "BFPO_Packet" Then
    strForm = "BFPO_Packets_input"
    ElseIf Me.Service = "e24Oversize" Then
    strForm = "e24Oversize_input"
    ElseIf Me.Service = "EmergencyUkTracked" Then
    strForm = "EmergencyUkTracked_input"
    ElseIf Me.Service = "RegisteredMail" Then
    strForm = "RegisteredMail_input"
    ElseIf Me.Service = "UKTracked" Then
    strForm = "UKTracked_input"
    ElseIf Me.Service = "UKTrackedPriority" Then
    strForm = "UKTrackedPriority_input"
    Else
    strForm = "main"
    End If


    DoCmd.OpenForm strForm, , , "input= " & Me.Service
    End Sub
    "
    i want the other forms to be shown in main form not opening as separate forms.

    i want the strategy to populate all the details from all sub forms into a single table.
    it will be highly appreciated if someone can guide me.

    as i mentioned i am very novice user but help will be highly appreciated.

    Regards

    A learner

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You can put an empty subreport control on the form and set its source object property in this code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31
    i am so thankful to this forum and specially pbaldy for his replies.

    i cant have done what i have done so far without this forum and your help.

    as i mentioned before as i am very new to forum and field i need some more guidance in some things.

    i have attached the file what i am working on.

    i need some detailed help of how to make it work according to my requirements.

    i will appreciate your time and help and will be so thankful if you can come with some ideas.

    1. i want all the output going into a single table which i can export finally in excel at some certain time like "6.00 PM".
    2. i need to have certain conditions on certain services . the services are airsure , e24oversize , registered mail etc.
    3. it will be great if you can give me ideas which i can make tables from start and doing VB coding.Actually i have done some VBA code already.

    i want to make a very good application.i am working hard and putting my effort but as i said u i am novice so i have to work hard to learn and implement at same time.

    Highly appreciated Baldy.As i am new to forum is there any way i can post something which mention you in blue referring you. i have no idea how to do that.

    Regards

    A learner
    Last edited by tariq nawaz; 09-07-2012 at 09:39 AM.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Happy to help, and your thanks are enough.

    I don't really understand the questions. You can export a query that pulls together data from different tables. I have no idea what you mean by needing certain conditions on certain services.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 08-29-2012, 07:25 PM
  2. details form open from listbox selection
    By accesshelpme in forum Access
    Replies: 9
    Last Post: 05-18-2012, 10:50 AM
  3. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  4. Replies: 1
    Last Post: 09-21-2011, 03:21 AM
  5. Combo box not picking up values basis dlookup
    By amangupts in forum Programming
    Replies: 13
    Last Post: 07-15-2011, 11:03 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
  •  
Other Forums: Microsoft Office Forums