A CMD button to clear a table column

Dayton

Registered User.
Local time
Today, 15:09
Joined
May 2, 2014
Messages
20
I'm currently making an Experience Statement for my company. In one of the forms I've created I an Industry sort that is weighted and connected to a table so that it'll show a report based on the numbers provided IE. 1-5 One being shown first and a blank statement not showing on the report at all.

I have the report function working correctly the only thing I would like is a cmd button that clears sort table of numbers so that it doesn't show anything and can start fresh. What VBA code shall I use?

I was thinking something along the lines of this, but it's not working.

Dim s as String
s = "UPDATE All_Projects_Sort_Table SET Industry Sort = Null;"
CurrentDb.Execute s
Requery



Attached are some images to give you an idea of what I am talking about. I hope I'm making sense.
 

Attachments

  • Design Custom Report Selector.PNG
    Design Custom Report Selector.PNG
    19 KB · Views: 115
  • Custom Report Selector.PNG
    Custom Report Selector.PNG
    28 KB · Views: 112
  • All Projects Sort Table.PNG
    All Projects Sort Table.PNG
    21.7 KB · Views: 115
Special characters in field names strike again. When you have special characters in your names (like a space) it requires additional coding to make it see those and recognize them as part of the field name. That additional coding is brackets around the offending name field name.

So, in your SQL you should have [Industry Sort] instead of Industry Sort.
 
That's a bingo! Thanks! That did the trick.
 

Users who are viewing this thread

Back
Top Bottom