469,142 Members | 1,089 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,142 developers. It's quick & easy.

Access VBA and CMS Supervisor

New to the site and new to Access and all it's wonders.

Hoping someone can assist or provide direction.

I am working on building a simple Form. Currently, a single Combo box that will list selections from "Groups" Table.

What I am trying to accomplish is for each value within the Cbx, pressing the Cmd button with perform adjustments through Avaya: CMS.

I have a similar workbook in excel that performs the same task in Excel, but I am less familiar with the intricacies of Access.

Being new to Access, I am looking for any assistance in learning how to assign the appropriate values to the skilling portion of the code.

any help is appreciated.

Here is a snip of my code

Private Sub Skill_Click()

Dim rst As DAO.Recordset
Dim Agents As String
Dim C As Integer
Dim i As Integer
Dim S As Integer
Dim Level As Integer
Dim ACD As Integer
Dim Skill As String
Dim Level As String

Dim LastRow As Long
Dim LastCol As Long

Set cvsApp = CreateObject("ACSUP.cvsApplication")

Set cvsSrv = cvsApp.Servers(1)
Set AgMngObj = cvsSrv.AgentMgmt
On Error Resume Next
AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1

If [Group] = "ROI NGP Intake" Then
Set rst = CurrentDb.OpenRecordset("ROI_NGP_Intake")
C = rst("Skill1")

LastRow = DCount("*", "ROI_NGP_Intake") + 1 'Row count
Debug.Print LastRow
LastCol = rst.Fields.Count + 1 'Column count
Debug.Print LastCol

'Do nothing

End If

MsgBox LastRow & vbNewLine _
& LastCol _

ACD = 3
For i = 1 To LastRow
S = 1
Agents = rst("Lucent")
ReDim SetArr((LastCol - 2) / 2, 4)
' For C = rst("Skill1") To LastCol Step 2

On Error Resume Next
Skill = rst("Skill1")
Level = rst(i, C + 1).Value
SetArr(S, 1) = Skill
SetArr(S, 2) = Level
SetArr(S, 3) = 0
SetArr(S, 4) = 0
S = S + 1
Next C
AgMngObj.AcdStartUp -1, "", cvsSrv.ServerKey, -1
AgMngObj.OleAgentSetSkill_R16_1 ACD, Agents, 1, 0, 0, 0, S - 1, SetArr, ""
Next i

'MsgBox "Did it do a thing?"

End Sub
4 Weeks Ago #1
0 1086

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Fred Glickman via AccessMonster.com | last post: by
4 posts views Thread by douglaswade | last post: by
reply views Thread by magickarle | last post: by
2 posts views Thread by joeey | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.