Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximizer OLE to VB

Status
Not open for further replies.

PizMac

Programmer
Nov 28, 2001
90
GB
Does anyone out there use OLE to interface with Maximizer?
I have a very simple piece of VB code that hangs off a maximzer toolbar button. It returns me the current company information no problem. I then want to loop through all contacts for that company and I can't find the commands to access them
Any help gratefully appreciated. Skeleton Code follows.
I'm also going to post this in the VB forum on the off chance.......

Private Sub Command2_Click()
Dim objMaxAttach As New MaximizerTLB.AttachToCurrentInstance ' Define CurrentInstance object of running Maximizer
Dim objMaxCur As MaximizerTLB.CurrentRecord ' Define Current Record Object variable
Dim objMaxApp As MaximizerTLB.Application
Set objMaxApp = objMaxAttach.GetApplicationObject
Set objMaxCur = objMaxAttach.GetCurrentRecordObject ' client or contact


With objMaxCur


sresult = .GetFieldValue("City")
Text1.Text = sresult
' check fields required

myRecType = .GetFieldValue("rectype")
'1=companmy, 31=contact, 2=indivisual

Select Case myRecType
Case Is = 31
Case Is = 1

objMaxApp.ActivateWindow ("Contact")


' get contacts here and loop through
' Call objMaxCur.ScrollList("top")
' Call objMaxCur.ScrollList("linedown")
Case Is = 2
End Select

End With

Set objMaxCur = Nothing ' Release object
Set objMaxAttach = Nothing ' Release Object
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top