Results 1 to 5 of 5

Thread: plzz help me... urgent for my assignment.. or i will failll

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    5

    Angry 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...

  2. #2
    Fanatic Member
    Join Date
    Oct 2003
    Location
    Portville NY
    Posts
    780
    What is your problem? be a little more specific please

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    5
    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...

  4. #4
    Lively Member
    Join Date
    Jun 2003
    Posts
    114
    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 ...

  5. #5
    Fanatic Member
    Join Date
    Oct 2003
    Location
    Portville NY
    Posts
    780
    here is some sample code for you from one of my apps. i'm not very good @ vb either but this works.
    VB Code:
    1. 'Displays the records in the text boxes
    2. Private Sub display()
    3. txtNum.Text = Str(rs(0)) 'space in case of null
    4. txtName.Text = rs(1)
    5. End Sub
    6.  
    7. 'Assigning the table feilds to the text boxes
    8. Private Sub assign()
    9. rs(0) = Val(txtNum.Text)
    10. rs(1) = txtName.Text
    11. 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
  •  



Click Here to Expand Forum to Full Width