|
-
Nov 7th, 2000, 11:17 AM
#1
Thread Starter
Black Cat
I'm writing some VBA for an Access 2000 DB, and I'm wondering what the heck is in a blank field of a record???
I'm having DAO execute an DELETE SQL statement to clean up the DB by removing all records where the "Name" is blank, but I can't get it to work right.
Code:
Private Sub Form_Unload(Cancel As Integer)
Dim db As DAO.Database
Set db = CurrentDb
db.Execute ("DELETE * FROM [TimeSheetTable] WHERE [TimeSheetTable.Name] = """";")
Set db = Nothing
End Sub
I've tried empty strings ("" and '') and NULL, but they don't match the blank fields. I've also ran the SQL statement in Access's Query designer - it gives me a warning that I'm about to delete 0 rows...
Thanks,
Frustrated Josh
-
Nov 7th, 2000, 11:35 AM
#2
Thread Starter
Black Cat
Nevermind, I overlooked IsNull()...
Josh
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
|