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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximizer OLE

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

 
Greetings! Your best to contact Maximizer about purchasing the Toolkit for the software. It provides documentation pertaining to OLE interfaces.

Thanks

James Keep, A.C.E.
Crystal Reports(tm) Certified Consultant 8.5 (CRCC)
CMRC
Crystal Decisions Business Partner
Montreal, Qc, Canada
 
Thanks - I HAVE the toolkit - problem has now clarified - the thing does work but after exiting the VB it closes the Max address book (leaves a pale blue screen) and then crashes Maximizer. I have a Maximizer agent looking at it for me now ... but if anyone knows of a similar bug or whatever?
 
Q: What version of Maximizer Enterprise are you using and which database engine??

James Keep, A.C.E.
Crystal Reports(tm) Certified Consultant 8.5 (CRCC)
CMRC
Crystal Decisions Business Partner
Montreal, Qc, Canada
 
Thanks for your continued interest - you're the only person in the whole world who cares!!!!!!
I have now got an upgrade for maximizer and it now doesn't crash (well-not yet anyway) - it still closes the address book window and leaves me with a pale blue screen though -annoying - I'm on 7.5 series 1344 pervasive build 173.
If you don't mind another thing? - I'm trying to do an update to name_and_address and although the GetFieldValue works fine the SetFieldValue doesn't do anything. I can re-work it with individual fields (e.g. address_line_1 etc)but is this a known problem?
Thanks in advance
Judith Pizer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top