Results 1 to 18 of 18

Thread: How to build a Count Querie for VBA code

Hybrid View

  1. #1
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: How to build a Count Querie for VBA code

    do you check the recordset returned to see if it is not an empty recordset?
    afaik it will only return any records if there is an exact match to the parameter
    so the most it will return is 1 record

    Count = rs("MaxCode") + 1
    i have no idea what is in field maxcode, but it does not seem, to me, relevant to this operation, i would assume it would always be 0, empty or null, which is why each new name is added with 001
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    40

    Re: How to build a Count Querie for VBA code

    so what would you do in order to make the application do that counting on the customers that have the same name

Posting Permissions

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



Click Here to Expand Forum to Full Width