Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7

    Arrow Unanswered: Autonumber in subform

    Good day folks,
    I have been searching here for the problem, which most concerns me, but without sheer success, if You could help me with something, would be great.

    I'm creating a database for work. While clicking on a appropriate button, the form opens. Every entry entered in a form has own identical number, e.x. test report, which set no dublicate. While a user fills the fields on the form, there are no problems in moving to the table. The problem in subform. Subform must illustrate the test report number in every row, like an autonumber automatically beginning after new information entered, how I can do that?

    I have a code, ok, it works only with one row,
    Me.[TIS_UT_Subform_EN12].Form![Test Report] = Forms!TIS_UT_Form_EN1.Text6

    Any help would be appreciated,

    Regards,
    Pavel

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What are the structures of both tables? Which relationship exist between both of them? How is the Form/subForm mechanism implemented? Where, or on what event is the code you supplied being used? What precisely are you trying to achieve?
    Have a nice day!

  3. #3
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7
    The form has its own table, where to every textbox there are assigned values in the table. The subform has apartly table, which is connected only with table's form with (test report). Adding subform to form I have defined the fields, which are connected with main form. Everything goes all right, except one thing. Test report is unique key, which must not being repeated. While a user fills new protocol(form), the information is entered into tables, subform and main table. Subform has several fields, where ID field is test report(it is hidden).

    Test report entered in main form needs to be moved to the test report field in subform. Data entry goes in table view in subform, where to new created row corresponds new information. Ok, suppose it's clear to get it. Sorry...

    I want the test report field in subform to show the same test report number in every row, existing in the subform)))
    I only found a code, allowing me everything before said only to one row, how to spread to other rows???
    This code is entered into form current...
    Me.[TIS_UT_Subform_EN12].Form![Test Report] = Forms!TIS_UT_Form_EN1.Text6
    Text6- a test report number from main form)))

  4. #4
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7
    Example,

    In Main form:

    Test report: 200100

    In Subform:

    Test report field
    200100
    200100 [/B]
    Weld number field
    2
    4
    Defect type
    1011
    2010

  5. #5
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7
    guys, any proposals?

  6. #6
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7
    Indispensably need help)))

  7. #7
    Join Date
    Nov 2010
    Posts
    84
    From the above, I think you were hard to understand exactly what you want. If you can attach an example database with test data.

  8. #8
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7

    DB file

    I have attached a file, where I have two pages. Mine problem is, that entering the data into second page in the field of test report in subform, I want automatically transfer test report from test report on the main form. Try looking the problem, if You understood me.
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2010
    Posts
    84
    The model database is not good. In attashed I have given you the model of your database model and how it should be. And if I understand your problems I have attached a database that is supposed to be.
    Attached Files Attached Files
    Last edited by eremija; 08-04-11 at 17:46.

  10. #10
    Join Date
    Jul 2011
    Location
    Estonia
    Posts
    7
    Thank you for your wasted time. Will try to look tomorrow))))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •