Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005

    Unanswered: form sub form problem

    Dear All

    I have a main form. Now I simply created a sub form on main form without linking it. the main form is a data entry form. The sub form is showing the no. of records punched through main form.
    the sub form based on a query which calculates the records.
    the problem is that I want as one record completed; the subform total should be changed but nothing happened.
    I used 'requery' at last field of main form but control never shift to new record.
    the query for main form is as under:
     SELECT Question.KPO, Question.Batch, Question.Customer, Question.Reading, Question.prem_status, Question.Prem_type, Question.M_loc, Question.M_Status, Question.Gas_Use, Question.M_cond, Question.Reg_cond, Question.Supply_Source, Question.Family_size, Question.Kitchen, Question.Gyser, Question.other_app, Question.Rem, Question.EmpNum, BillingHR.Name, Question.Date
    FROM Question INNER JOIN BillingHR ON Question.EmpNum = BillingHR.[Emp No];
    and the query for sub form is as under:

     SELECT [Copy Of Nil-Min-Master].REGION_DESCR, [Copy Of Nil-Min-Master].CIRCLE, [Zone Name].SUBZONE_DESCR, Count([Copy Of Nil-Min-Master].CUSTOMER_NO) AS [Total Forms Sent], Count(Question.Customer) AS [Total Forms punched], [Copy Of Nil-Min-Master].Type, [Copy Of Nil-Min-Master].PHASE
    FROM ([Copy Of Nil-Min-Master] LEFT JOIN Question ON [Copy Of Nil-Min-Master].CUSTOMER_NO = Question.Customer) INNER JOIN [Zone Name] ON [Copy Of Nil-Min-Master].RPT_SUBZONE_CODE = [Zone Name].SUBZONE_CODE
    GROUP BY [Copy Of Nil-Min-Master].REGION_DESCR, [Copy Of Nil-Min-Master].CIRCLE, [Zone Name].SUBZONE_DESCR, [Copy Of Nil-Min-Master].Type, [Copy Of Nil-Min-Master].PHASE
    HAVING ((([Zone Name].SUBZONE_DESCR)="malir") AND (([Copy Of Nil-Min-Master].Type)="min") AND (([Copy Of Nil-Min-Master].PHASE)="i"));
    I hope an urgent reply.



  2. #2
    Join Date
    Nov 2007


    the simplest solution would be create a button on main form
    on button click event give the requery
    hope it helps you out

  3. #3
    Join Date
    Jun 2007
    Maitland NSW,Australia
    At the last field the data entered is still in memory, in order to save the data to the table you must move to a new record or have a button to requery the total then move to a new record.

    You could use a continuous form and use a text box on the form to display your counters. To update the counter you move to new record or to a previous record.

Posting Permissions

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