-
Nov 21st, 2019, 12:18 PM
#1
Thread Starter
Addicted Member
How does VB6 display message box that reads data from a mdb table into report?
I am new to VB6 and I now learn some things.
We have a complete application developed in VB6 and Visual Studio 6.0 and it is an app. for doing statistics.
Mainly it is for data entry and after the complete data set is recorded into the database, this application
has an automatic functionality to find errors in the data.
I can run the error checks on a button, but then I can also view the errors displayed in VB6 report from a local table called Errors where the found errors in the data are saved.
There is a button which displays the report but before it does that, a message window appears which has a title like "SQL JET OLE" and I can set path to my mdb where the Errors table resides. There are also other settings I can change in this window.
How is this message window displayed? Is it somehow connected to the report(dsr) itself or I somehow a MsgBox is displayed with given settings? Or maybe a predefined window class or a component ?
I need to modify the path to the mdb in this JET OLE window as it opens a non existing path way.
-
Nov 21st, 2019, 12:49 PM
#2
Re: How does VB6 display message box that reads data from a mdb table into report?
How about providing an image of that 'message window'...it is possibly simply a form.
To attach an image here on this forum, use the Go Advanced button (bottom right), and then Click the "Manage Attachments" button...'find' the image (which you can take with several different tools...I use MS's Snipping Tool a lot (and save as jpg), upload it, and then add it 'in line'.
Sammi
-
Nov 21st, 2019, 12:55 PM
#3
Thread Starter
Addicted Member
Re: How does VB6 display message box that reads data from a mdb table into report?
I am currently at home, so I cannot access the code at the moment and application itself.
It seemed like some predefined component that can open a VB6 report with data from a mdb table.
Ok. Will get back to this tomorrow.
-
Nov 21st, 2019, 01:58 PM
#4
Re: How does VB6 display message box that reads data from a mdb table into report?
What you are describing does not sound like a message window. It sounds like a form that has been added to supply those options you speak of.
As for how it is displayed most likely it is displayed using a form.show method in the code before the report is called.
-
Nov 21st, 2019, 02:22 PM
#5
Re: How does VB6 display message box that reads data from a mdb table into report?
Perhaps you are talking about the dialog displayed by the Jet provider when the Connection's "Prompt" Property has a valid value other than "No" or is it another dialog?
Code:
Option Explicit
Private Enum DBPROP_INIT_PROMPTS
DBPROMPT_PROMPT = &H1 'Alias: "Prompt"
'User is always prompted for initialization information.
DBPROMPT_COMPLETE = &H2 'Alias: "Complete"
'Prompts the user only if more information is needed.
DBPROMPT_COMPLETEREQUIRED = &H3 'Alias: "CompleteRequired"
'Prompts the user only if more information is needed.
'Does not allow the user to enter optional information.
DBPROMPT_NOPROMPT = &H4 'Alias: "No"
'Do not prompt the user
End Enum
Private Sub cmdJet_Click()
With New ADODB.Connection
On Error Resume Next
.Open "Provider=Microsoft.Jet.OLEDB.4.0;Prompt=CompleteRequired"
If Err Then
MsgBox Err.Description
Else
.Close
MsgBox "Ok"
End If
End With
End Sub
That's a really, really old dialog that seems to date back to 16-bit Jet.
A newer one is available via the MSDASC.DataLinks object (Microsoft OLE DB Service Component 1.0 Type Library):
-
Nov 21st, 2019, 04:42 PM
#6
Thread Starter
Addicted Member
Re: How does VB6 display message box that reads data from a mdb table into report?
@dilletante yes that's the window.
-
Nov 22nd, 2019, 04:30 AM
#7
Thread Starter
Addicted Member
Re: How does VB6 display message box that reads data from a mdb table into report?
@dilettante but is this window connected to a Data(DAO) component placed somewhere on the form?
Because I see only ADODC component.
Can i somehow see a list of components in my form?
Last edited by kutlesh; Nov 22nd, 2019 at 04:35 AM.
-
Nov 22nd, 2019, 05:40 AM
#8
Re: How does VB6 display message box that reads data from a mdb table into report?
There is no crusty old DAO in any of the stuff I posted about.
What makes you think it isn't the ADODC that is raising this dialog? Check its ConnectionString property, it may be requesting a prompt there.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|