creating a new record in 2 different forms with same ID number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mjmars2
    New Member
    • Nov 2008
    • 2

    #1

    creating a new record in 2 different forms with same ID number

    I am in desperate need of some assistance with some VBA code I am working on. Here's what I'm trying to do:

    I have two forms- [Details] is the main form and [Quarterly Data] is another form that pops up when you click a command button within the [Details] form. I have an auto ID number [Detail_ID] that is set up in the [Details] form when creating a new record. I have a [Quarter_ID] field in the [Quarterly Data] form that I'm trying to link to that [Detail_ID] number from the [Details] form when generating a new record.

    The problem is when I generate a new record in the [Details] form, what's the code to get the [Quarterly Data] form to generate a new record also using the same ID number??? It's hard when they are in two separate forms....
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hello.

    Could you please post metadata of the tables the records have to be added to.
    Here is an example of how to post table MetaData :
    Table Name=tblStudent
    Code:
    [i]Field; Type; IndexInfo[/i]
    StudentID; AutoNumber; PK
    Family; String; FK
    Name; String
    University; String; FK
    Mark; Numeric
    LastAttendance; Date/Time
    Regards,
    Fish

    Comment

    • mjmars2
      New Member
      • Nov 2008
      • 2

      #3
      The table name that is associated with [Details] is:
      Table Name=Details
      ID=lap_id

      The table name that is associated with [Quarterly Data] is:
      Table Name=Quarterly Data
      ID=quarter_lap_ id

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Ok.

        I recall something similar in previous threads:
        Datasheet to Open Child Form
        Add Matching Record on Filtered Form

        Regards,
        Fish

        Comment

        Working...