Results 1 to 2 of 2
  1. #1
    plus_stick is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Almaty
    Posts
    1

    Counter in a query with joined tables

    Hi, everyone.
    I've a query with joined tables in VBA to fill data in continious form.
    And I want to make a dynamic Counter in it.


    Code:
    "SELECT cc_svod.kod_svod, cc_svod.datea, cc_svod.wave, cc_svod.CALL_ID, cc_svod.CALL_DATE, cc_svod.TOPIC1, cc_svod.TOPIC2, cc_svod.CLIENT_IIN, cc_svod.CLIENT_NAME, cc_svod.CLIENT_PHONE, cc_svod.CLIENT_LANGUAGE, cc_svod.operator, cc_svod.record_status, cc_info.c_status " & _
    "FROM cc_svod LEFT JOIN cc_info ON cc_svod.kod_svod = cc_info.kod_info " & _
    "WHERE cc_svod.operator = " & v & " AND " & _
    "cc_svod.datea = " & Chr(35) & Replace(Format(Me.select_date.Value, "mm/d/yyyy"), ".", "/") & Chr(35) & " AND " & _
    "cc_svod.wave = " & Me.select_wave.Value & " " & _
    "ORDER BY cc_svod.CALL_ID "
    How can I realize?
    Thanx in advance.
    PS. Method with DCount works very slow and shows incorrect counter.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Dynamic counters can be iiffy. They can change as you look at them.
    The easiest and reliable way is :
    have an empty 'reporting' table with an autocounter, then copy the data to it.

    the macro would:
    copy the tRptTbl_MT to tRptTbl
    append data to tRptTbl

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

Similar Threads

  1. Replies: 8
    Last Post: 06-04-2014, 10:01 AM
  2. Replies: 3
    Last Post: 04-23-2014, 08:22 PM
  3. Query with Counter from multiple tables
    By dmenger in forum Queries
    Replies: 3
    Last Post: 03-25-2014, 11:07 PM
  4. Replies: 3
    Last Post: 07-16-2010, 12:32 PM
  5. Replies: 5
    Last Post: 08-07-2009, 05:23 PM

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