By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

Access2002 * external apllication

P: n/a
Hi

I have asked several groups now for advise but I feel I must be
confusing either them or myself, but anyway here goes!

Below is code taken from the "OnClick" function of a
command button within a Sub-form called Plots.
This Sub-form resides along side six other Sub-forms
within the Details section of a main form called Session
Header.I require to be able to go into any of these
subforms at any given time, unfortunately I have one
problem which prevents me from doing this and it occurs
when I am in the Subform "Plots", if I select one of the
Records of this subform and retrieve the data using a
Graphics Software Application, although it pulls up the
plot onto the screen I cannot then go into any of the
other subforms to analyse the data for the Plot I select.
The small Routine as mentioned previously is shown here:

Private Sub RunPlottergeist_Click()
On Error GoTo Err_RunPlottergeist_Click
Dim Freq As String
Dim Plottergeist As PltgeistX
Set Plottergeist = CreateObject("Pltgeist.PltgeistX")

'Sets Plottergeist to run in mode for resultant Plot for
this application
Plottergeist.Window_State "Norm"
HPGL_Data.SetFocus
Plottergeist.AddHPGL (HPGL_Data.Text) 'HPGL data
'Originating from HP Analyzer
Plottergeist.CopyGraphicToClipBoard 'Note. Max of 24 Plots

'AppActivate "Microsoft Access"
'DoCmd.GoToControl "SignalPassFail"
'Freq.SetFocus
'Assistant.Reduced = True
MsgBox ("Click To Close Plottergeist")
Plottergeist.CloseApp

Exit_RunPlottergeist_Click:
Exit Sub

Err_RunPlottergeist_Click:
MsgBox Err.Description
Resume Exit_RunPlottergeist_Click

End Sub

Once the command button has been selected the graphics
software opens and retrieves the data producing a plot,
however as explained above, until I close this package
again using the "OK" button on the Message Box "Click to
Close Plottergeist" I cannot look at any other data
within the other subforms, the main form, or to Access
the rest of the Database.

I have tried Deleting the Message box, but this does not
cure the problem since another message box appears,
"Microsoft Access", with a OK Button.

From a functional view point or aim, we need to select
any one or more records on the main Form, then to
retrieve a graphics image for those records, and to
analyse other data within the database.
Therefore it requires more than one Graphics image to be
displayed and at the same time to be able to analyse
other data within the database.
Finally, we are trying to reduce the amount of steps we
have to use to retrieve, analyse and save the right
Graphics plots with the right data.
I hope this helps

p.s. I am a novice when it comes to VB

TKS
...............................

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Aged wrote:
Hi

I have asked several groups now for advise but I feel I must be
confusing either them or myself, but anyway here goes!

Below is code taken from the "OnClick" function of a
command button within a Sub-form called Plots.
This Sub-form resides along side six other Sub-forms
within the Details section of a main form called Session
Header.I require to be able to go into any of these
subforms at any given time, unfortunately I have one
problem which prevents me from doing this and it occurs
when I am in the Subform "Plots", if I select one of the
Records of this subform and retrieve the data using a
Graphics Software Application, although it pulls up the
plot onto the screen I cannot then go into any of the
other subforms to analyse the data for the Plot I select.
The small Routine as mentioned previously is shown here:

Private Sub RunPlottergeist_Click()
On Error GoTo Err_RunPlottergeist_Click
Dim Freq As String
Dim Plottergeist As PltgeistX
Set Plottergeist = CreateObject("Pltgeist.PltgeistX")

'Sets Plottergeist to run in mode for resultant Plot for
this application
Plottergeist.Window_State "Norm"
HPGL_Data.SetFocus
Plottergeist.AddHPGL (HPGL_Data.Text) 'HPGL data
'Originating from HP Analyzer
Plottergeist.CopyGraphicToClipBoard 'Note. Max of 24 Plots

'AppActivate "Microsoft Access"
'DoCmd.GoToControl "SignalPassFail"
'Freq.SetFocus
'Assistant.Reduced = True
MsgBox ("Click To Close Plottergeist")
Plottergeist.CloseApp

Exit_RunPlottergeist_Click:
Exit Sub

Err_RunPlottergeist_Click:
MsgBox Err.Description
Resume Exit_RunPlottergeist_Click

End Sub

Once the command button has been selected the graphics
software opens and retrieves the data producing a plot,
however as explained above, until I close this package
again using the "OK" button on the Message Box "Click to
Close Plottergeist" I cannot look at any other data
within the other subforms, the main form, or to Access
the rest of the Database.

I have tried Deleting the Message box, but this does not
cure the problem since another message box appears,
"Microsoft Access", with a OK Button.

From a functional view point or aim, we need to select
any one or more records on the main Form, then to
retrieve a graphics image for those records, and to
analyse other data within the database.
Therefore it requires more than one Graphics image to be
displayed and at the same time to be able to analyse
other data within the database.
Finally, we are trying to reduce the amount of steps we
have to use to retrieve, analyse and save the right
Graphics plots with the right data.
I hope this helps

p.s. I am a novice when it comes to VB

TKS
..............................

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


You gave a good description of your problem. But I would like a
clarification. The plot file is not "inserted" in the subform but
rather is opened in an external program Plotergeist?

IOW, you want to view the plot file from an external program. Let's say
you have a file called Plot1.Plt. Can you, in Explorer, click on
Plot1.Plt and have it open the requistite program to view the plot? If
that is possible, see the following:
http://www.mvps.org/access/api/api0018.htm. This allows you to open a
registered file (files with this extension open up a specific program)
Also see http://www.mvps.org/access/api/api0001.htm and
http://www.mvps.org/access/api/api0002.htm. These are File/Open dialog
boxes to select a file. Basically, you click on the Modules tab, click
New, and paste the code for each API call into a separate module.

Also, look at the command ShellExecute in help. This will open a new
application. I should think you could pass the application name and an
argument. Ex: "TEst Test1.Txt" that opens app Test and Test app opens
the file TEst1.Txt.

If you can't view a plot file using a registered file type, perhaps you
need to empty the clipboard. I went to http://groups.google.com,
clicked on advanced search, and entered
CopyGraphicToClipBoard
in the words to search for and
*access*
in the groups to search.

Someone using the handle NickH had a vey similar problem but that was
back in 2003. Can you store the plot in an image control? Copy the
image then paste it somewhere?

Are your plot files actually print files?

Also, I mentioned ShellExecute. If you can open the file via that
method you could also store the info as a hyperlink field in your table.
See HyperlinkPart() in help to see how you can extract what is
displayed to the user and the file name.

Sorry I can't be of more help.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.