|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
How to clear/delete all data of access table by VB?
Hi all,
Please help me, how to clear/delete all data of access table when every time I hit cancel button command in VB application form and that table gonna be BLANK for next formload use. Thank you very much, ps: By the way, how to save time in DTPicker1 into D/T field of access table because it just show date only ? Thank in advances |
|
#2
|
|||
|
|||
|
Hello chuiwaucr,
Insert this line into your Cancel button code: DoCmd.RunSQL ("DELETE * FROM YourTableName;") |
|
#3
|
|||
|
|||
|
its not clear (at least to me) what you want to do, are you clearing the form or are you deleting all/selected records in the database?
|
|
#4
|
|||
|
|||
|
Quote:
My cancel button in VB application form, when I put DoCmd.RunSQL ("DELETE * FROM YourTableName;") It says "variable not defined" (error highlight at DoCmd) when I compile program. Please Help me more, I'd appreciate much. Thanks so much JamesLe |
|
#5
|
|||
|
|||
|
Hi JamesLe,
I got it, thanks for your reply. By the way, how to save date and time from DTPicker of vbform into access table. Because I just save date only, I want both date and time. thanks, |
|
#6
|
|||
|
|||
|
Hello chuiwaucr,
Try: DTPicker1.Value = Now() |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to clear/delete all data of access table by VB? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|