Share via

Two continuous form subforms in main form linked

Anonymous
2015-10-21T19:57:42+00:00

Hello,

I am a new user to access trying to build a database for a very low resource team. ANY help would be greatly appreciated. I have two continuous form subforms in a main form. The two subforms are on different tabs. Here's how it is organized

Main form:

client customer # (PK)

five other fields 

Continuous subform 1 (tab 1)

client customer #

ticket # (PK)

ticket type

ticket owner

Continuous subform 2 (tab 2)

ticket # (PK)

start usage 

end usage

I want to make it so that when I type in the ticket #'s on subform 1 on the first tab, by the time I go to the second tab the same ticket #s show up in the first column of subform 2. Is there anyway to automate this? Thank you

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

11 answers

Sort by: Most helpful
  1. Anonymous
    2015-10-21T21:40:56+00:00

    I'm wondering about your second subform. Will there be multiple records of usage for each ticket? If so, then TicketNum (yes, you do NOT want to use # in a fieldname, it's a date delimiter) cannot possibly be the Primary Key.

    Just how will the Usage be handled?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-10-21T21:15:56+00:00

    Hi Karl, right now the fields in subform #1 are in one table, and fields in subform #2 are in a different table, and the two tables are linked by field Ticket#. Are you suggesting that I just combine these two tables then?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-10-21T21:14:11+00:00

    H Duane! Thank you so much for your reply.

    Yes ticket # is the PK for both subforms. The first form indeed is linked to the parent main form with Link Master/Child. I tried making the unbound text box and linking the second subform to the first. It works fine for the first entry of the continuous form in subform #1 (i.e. subform #2 updates automatically with ticket # filled in) however when I make a second entry in subform #1, subform #2 updates the first line, overriding what was there previously, with the second line data of subform #1. Is using the unbound text box supposed to update just one value?

    Thank you!

    Was this answer helpful?

    0 comments No comments
  4. Duane Hookom 26,825 Reputation points Volunteer Moderator
    2015-10-21T21:02:15+00:00

    Ist [ticket #] the primary field of both subform record sources? I'm not sure why you would need a continous form for the second if there aren't multiple records per ticket #.

    I assume you have the first subform linked with Link Master/Child.

    Add a text box to the main form [txtTicketNum] and set its Control Source to the Ticket # from subform 1. The control source might be in the form:

    Control Source: =[subform1].[Form]![txtTicketNum]

    Then simply set the Link Master/Child of the second subform the txtTicketNum and the ticket # field from the subform 2.

    Link Master: txtTicketNum

    Link Child: [Ticket #]

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2015-10-21T20:36:13+00:00

    I want to make it so that when I type in the ticket #'s on subform 1 on the first tab, by the time I go to the second tab the same ticket #s show up in the first column of subform 2. Is there anyway to automate this?

    If both subforms use the same table (you have ticket # in both) then it should work.

    NOTE :  You should not use spaces and any other character than numbers, underscore, and letters in table and field names. 

           You can use 'camel case' like this -- TicketNum

    Was this answer helpful?

    0 comments No comments