If you look in your Task Manager (NT) under processes and monitor whether
your created instance of Mapinfow.exe dies or not when you execute that sub
procedure, It's quite possible that you have a MapInfoObject.do command
previous to your close table statements that causes the instance of MapInfo
to drop out.
Overall you shouldn't have any probs with commands like
MapInfoObject.Do "Close Table MyTable"
MapInfoObject.Do "Close All "
In a similar vein, has anyone tried integrated mapping in Access97 using
VBA.
In VB5/6 I would use the follwing syntax to create a MapInfo Object and
display the MapInfo.wor in a picture/container called MapWindow
'Create MapInfo Object
On Error GoTo create_error
Set mapinfo = GetObject(, "mapinfo.application")
create_error:
Set mapinfo = CreateObject("mapinfo.application")
'Open MapInfoW and parent window using a PictureBox called MapWindow
mapinfo.do "close all"
mapinfo.do "set next Document Parent " & MapWindow.hWnd & " Style 1"
mapinfo.do "run application homedirectory$()+""\mapinfow.wor"" "
In Access I can make the form the container by substituing "MapWindow" for
"me"
mapinfo.do "set next Document Parent " & Me.hWnd & " Style 1"
But I don't seem to be able to find a picture/container that I can use to
hold the map image (I want to place buttons on the form so an entire form
for a map window may be inappropriate)
I've tried an image (I get told that method or data member not found) but I
don't seem to be able to find a picture tool similar to that found in VB5/6.
If anyone has any ideas they would be greatly appreciated.
Thanks,
Tim Chinchen (IT Services) Bournemouth Borough Council
mailto:[EMAIL PROTECTED]
> Can you show how you're establishing "MapInfoObject"?
>
> Should be something like:
>
> Set MapInfoObject = GetObject(, "MapInfo.Application")
>
> Alternatively you could use the CreateObject method.
>
> Hope this helps.
>
>
> > Hiya
> >
> > Could you please help me out, I am working on a project which uses
> MapInfo
> > Pro v5.0 and I used this command line in Visual Basic v5.0
> >
> > MapInfoObject.Do "Close Table " & Tablename
> >
> > MapInfoObject.Do "Close All "
> >
> > Everytime I run into error status, it always stop at those lines above
> and
> > the error message read
> >
> > Method 'Do' of object 'IMapInfo' failed
> >
> > Can you all please shine any light into this problem and help me out
> >
> > Kind regards
> >
> > Joshua White - Ordnance Survey System developer.
>
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]