Results 1 to 6 of 6

Thread: Do you remember me for Data Control & Listbox ? Help me again now, please!

  1. #1


    Hi there,
    I am very happy to find many people help me here.
    Last month someone helped me to get personal information
    from a person selected in the listbox.

    The query string was:
    Data1.RecordSource = "SELECT * FROM Engineer WHERE [Last Name and First Name]= '" & DBlistbox.Text & "'"

    Now I would like to delete the selected Engineer and
    be able to undelete it.

    In addition I would like to modify the personals information; to visualize them I use some textboxes with DataSource=Data2 and DataField = the respective field.

    I can write in the texboxes, but I would like to store the changes only by pressing the CommandButton "Modify"


    THANK YOU for all; write me as soon as possible!


    Data1 is = Data2, but I need two different controls; it's ok.

    [Edited by stefano on 10-29-2000 at 03:07 AM]

  2. #2
    Lively Member
    Join Date
    Aug 2000

    the way to delete the current record is:


    however if you wish to undelete it, you must save it somewhere - perhaps in a second table named differently with identical fields - you would then be working with 2 recordsets (or 2 Data Controls)

    If you wish to store changes to a database only when a commandbutton is clicked, then the textboxes would not be bound to the data control

    Private Sub Command1_Click()
    Data1.Recordset.Fields("firstfield") = Text1
    End Sub

    it is difficult to answer your question more fully without writing an entire application


  3. #3
    Thank you very much. I think I'll do as like your answer.
    Maybe I must work without bound the textboxes.
    I do it now, because tomorrow I'll show the program at
    the school.

  4. #4
    Lively Member
    Join Date
    Sep 2000

    hey stefano

    im having a simular problem but my problem is this
    i want to display the information from my SQL7 database in my dbgrid control how do i set my setting n the control data1 to see my SQL database???
    please help i have been asking evryone for about 2 weeks

  5. #5
    Hi johnnyboy23, you didnt write what exactly you want to show in the dbgrid. The entire database means what. Is it the tables and the fiels in them or is it a table and data in it. You should be clear with ur requirement before anyone can try to help you. All the best...vijay

  6. #6
    Hi there,
    the teachers have been proud of me for the work done.
    Many thanks to everyone helped me.

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