|
-
Sep 22nd, 2000, 01:55 PM
#1
Thread Starter
Junior Member
When the user opens a file from a common dialog box i want the project to update the text boxes on my form with data from the dbf file they select. how do i do this?
please help.
thanks in advance.
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Sep 22nd, 2000, 03:24 PM
#2
Hyperactive Member
OK so you have bound the control to the ADO, through the Datasource. And in the Datafield property you have set the table. The textboxes were set to the fields right?
So under the common dialog click (change) event procedure, do you have the code telling it to change?
Lee
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
-
Sep 22nd, 2000, 03:41 PM
#3
Thread Starter
Junior Member
What is the code to make it change?
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Sep 22nd, 2000, 03:50 PM
#4
Hyperactive Member
If you have them bound, and ready to go the text should display when the click event is fired. If the text does not change then refresh the form.
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
-
Sep 22nd, 2000, 04:10 PM
#5
Thread Starter
Junior Member
Here is the code for my open file dialog:
Private Sub Open_Click(Index As Integer)
On Error GoTo ErrHandler
'set filters
CommonDialog1.Filter = "DBF (*.dbf)|*.dbf"
'display file open box
CommonDialog1.ShowOpen
Data1.DatabaseName = CommonDialog1.filename 'sets database as selected file
Text2.DataField = "MARKET" 'this is the name of the field i want to pull
frmGlobal.Refresh
ErrHandler:
Exit Sub
End Sub
In the options for text2 the datasource is set as data1.
when they open the file the value in "MARKET" does not show up in the text box.
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Sep 22nd, 2000, 04:52 PM
#6
Hyperactive Member
Under the field "Market" I am assuming there are multiple entries?
It looks to me that you need to move the recordpointer to the first entry in the field, (or desired entry).
.movefirst
It dosen't know where to look, do you know what I mean?
...But what do I know!
Lee
 Mahalo 
VB6(SP5), VC++, COBOL, Basic, JAVA
MBA, MCSD, MCSE, A+
Computer Forensics
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
|