472,139 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

Access VBA and CMS Supervisor

2
Hello,
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


Else
'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
Aug 25 '21 #1
0 1319

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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.