|
-
Apr 13th, 2004, 01:45 PM
#1
Thread Starter
New Member
plzz help me... urgent for my assignment.. or i will failll
Private Sub Form_Load()
datStaff.DatabaseName = (App.Path+ "\Database\LCDSYS97.mdb")
datStaff.RecordSource = "Select * from STAFF"
datStaff.Refresh
Set txtID.DataSource =
txtName.DataField = ("stfName")
plz help mee... how to set the datasource and also data field... plz give me easy coding... im not very smart.. uwaaaa!!!
thanks in advance...
-
Apr 13th, 2004, 01:53 PM
#2
Fanatic Member
What is your problem? be a little more specific please
-
Apr 13th, 2004, 01:59 PM
#3
Thread Starter
New Member
Private Sub Form_Load()
datStaff.DatabaseName = (App.Path+ "\Database\LCDSYS97.mdb")
datStaff.RecordSource = "Select * from STAFF"
datStaff.Refresh
Set txtID.DataSource =
'this part... how to set the datasource to datStaff
txtName.DataField = ("stfName")
'and also this part; assign it to a field inside the database...
plz help mee... how to set the datasource and also data field... plz give me easy coding... im not very smart.. im waiting for u yall reply... i have 2 days from now... uwaaaa!!!
thanks in advance...
-
Apr 13th, 2004, 02:05 PM
#4
Lively Member
Originally posted by yongkey
Private Sub Form_Load()
datStaff.DatabaseName = (App.Path+ "\Database\LCDSYS97.mdb")
datStaff.RecordSource = "Select * from STAFF"
datStaff.Refresh
Set txtID.DataSource =
'this part... how to set the datasource to datStaff
txtName.DataField = ("stfName")
'and also this part; assign it to a field inside the database...
plz help mee... how to set the datasource and also data field... plz give me easy coding... im not very smart.. im waiting for u yall reply... i have 2 days from now... uwaaaa!!!
thanks in advance...
Try doing a search in this forum... There is plenty of examples of database connectivity ... Helping students with their homework is not something I do ... That's why it's homework ... Time to hit those books to find your answer ...
-
Apr 13th, 2004, 02:05 PM
#5
Fanatic Member
here is some sample code for you from one of my apps. i'm not very good @ vb either but this works.
VB Code:
'Displays the records in the text boxes
Private Sub display()
txtNum.Text = Str(rs(0)) 'space in case of null
txtName.Text = rs(1)
End Sub
'Assigning the table feilds to the text boxes
Private Sub assign()
rs(0) = Val(txtNum.Text)
rs(1) = txtName.Text
End Sub
paste these into your program and change them accordingly
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
|