By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Multi User Custom Counters (Numerous)

P: n/a
Hi,

I have searched through the groups and the web but still couldn't find
an answer to my question...

After reading the Microsoft knowledge base article on how to create a
multu user counter, that worked fine. However what I want to do is to
have lots of different counters.

I have numerous jobs, each job can have lots of work packages - which i
need to assign a work package number to - which i what I am using the
counter for. I have created a field the job table - which i intend to
use as the Work Package counter.

I think at the moment the code just calls the first field of
'WPCounter', when in fact it needs to call a specific record of
WPCounter (based on the selected Job Number).

The code I currently have for one counter...

Function Next_WP_Number()

Dim rs As ADODB.Recordset
Dim NextWP As Integer

Set rs = New ADODB.Recordset
rs.Open "1jbTable", CurrentProject.Connection, adOpenKeyset,
adLockOptimistic
NextWP = rs!WPCounter

rs!WPCounter = NextWP + 1
NextWP = rs!WPCounter
rs.Update

MsgBox "Next Work Package Number is " & Str(NextWP)
rs.Close
Set rs = Nothing

Next_WP_Number = NextWP

Exit Function
End Function

Any help would be appreciated!
Cheers,

Jul 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.