I'm in the process of making a searchable database for the company I work at, and have run into a few problems. I've googled this stuff and had problems either understanding what I found or finding anything at all..
A. Sorting the table in my form
I'm able to sort in one direction, but I'm lost in how to do it in the opposite direction. I have the simple code
Private Sub labelAudit_Click()
Me.OrderBy = "Audit"
Me.OrderByOn = True
Which does what I want, except I need to be able to sort in the opposite direction, and being fairly new to VB haven't figured that out.
B. Global variables
Well, to decide when I'm sorting ascending or when I'm sorting decending I figured I'd keep track of how many times the button has been clicked. If I declare Public sortBox As Integer in my General Declarations, then sortBox = 0 in my form_load() method, and then sortBox=sortBox+1 (or ++ if it works in VB), that should get the job done correct?
C. Usernames/Passwords
I tried messing around with the workgroups stuff, but I got myself into trouble and ended up locking myself out of my own database. I opened it on another computer without problem thankfully, but that also means the Username/Password protection provided would only be on a single computer and not actually encoded within the file. Anyway to set up usernames/passwords within the actual file?