|
-
Mar 22nd, 2010, 09:19 PM
#1
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
-
Mar 24th, 2010, 01:20 PM
#2
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|