|
-
Oct 28th, 2000, 03:32 PM
#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!
-----------------------------------------------
PS
Data1 is = Data2, but I need two different controls; it's ok.
[Edited by stefano on 10-29-2000 at 03:07 AM]
-
Oct 29th, 2000, 12:53 PM
#2
Lively Member
Stefano
the way to delete the current record is:
Data1.Recordset.Delete
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
Rick
-
Oct 29th, 2000, 04:00 PM
#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.
-
Oct 29th, 2000, 05:30 PM
#4
Lively Member
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
thanks
john
-
Oct 30th, 2000, 02:19 AM
#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
-
Oct 31st, 2000, 05:12 PM
#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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|