Skip to content

Instantly share code, notes, and snippets.

View janikvonrotz's full-sized avatar
:octocat:

Janik von Rotz janikvonrotz

:octocat:
View GitHub Profile
@janikvonrotz
janikvonrotz / Metadata
Last active December 18, 2015 07:49
Metadata #Metadata #CodingStandards #Batch #PowerShell #VisualBasic #XML #CSS #JSON #HTML
# Title:
# File name:
# Description:
# Tags:
# Project:
# Author: Janik von Rotz
# Author Contact: http://janikvonrotz.ch
@janikvonrotz
janikvonrotz / Comments
Created June 10, 2013 14:36
Comments #CodingStandards
Default / TYPO3 / Linux Config / Powershell /
# comment
PHP
// comment
CSS / JavaScript
@janikvonrotz
janikvonrotz / License.md
Last active December 18, 2015 07:49
License #Metadata #CodingStandards

License easy

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

License restricted

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

@janikvonrotz
janikvonrotz / Dropdown Open a Form.vbs
Created June 10, 2013 14:45
MSAccess: Dropdown Open a Form #VisualBasic #MSAccess
Private Sub btAuswerten_Click()
'Folgende Auswertungen sind möglich:
'Datenblatt Anlage
'Auswertung Wasserzinsen
'Auswertung Kontrollrapport
'GIS-Erdsonden
'GIS-Grundwasser
'GIS-Erdregister & Erdpfähle
@janikvonrotz
janikvonrotz / Full Text SQL Search Query.vbs
Created June 10, 2013 14:46
MSAccess: Full Text SQL Search Query #VisualBasic #MSAccess
Option Compare Database
'Erstellt ein SQL Query anhand eines Suchbegriffs
'DataSearch (vSearchtabel: Zu durchsuchende Table, vSearchKey: Suchbegriff, vOrderby: Sortieren nach, vBlackList: Spalten ignorieren, vWhere: Where Condition, vFrom: From Condition
Public Sub DataSearch(vSearchtable As String, vSearchKey As String, vOrderby As String, vBlackList, vWhere As String, vFROM As String)
'SQL Source Query
Dim strSQL As String
@janikvonrotz
janikvonrotz / Login Form.vbs
Created June 10, 2013 14:48
MSAccess: Login Form #VisualBasic #MSAccess
Option Explicit
Option Compare Database
Private intLogonAttempts As Integer
Private Sub Form_Current()
'On open set focus to combo box
Me.bt_Login.SetFocus
intLogonAttempts = 0
End Sub
@janikvonrotz
janikvonrotz / MD5 Hash Function.vbs
Created June 10, 2013 14:49
MSAccess: MD5 Hash Function #VisualBasic #MSAccess
Option Explicit
Option Base 0
' A VB6/VBA procedure for the MD5 message-digest algorithm
' as described in RFC 1321 by R. Rivest, April 1992
' First published 16 September 2005.
' Updated 2010-10-20 to fix ">" vs ">=" issue in uwAdd.
' --Thanks to Loek for this.
@janikvonrotz
janikvonrotz / Open Formular an jump to record.vbs
Created June 10, 2013 14:49
MSAccess: Open Formular an jump to record #VisualBasic #MSAccess
'Öffnet ein Formular und springt zu Datensatz mit einer bestimmten ID
'OpenForm(vForm: zu öffnendes Formular, vIDControl: Steuerlement mit ID, vIDColumn: Legt Spalte mit ID in Zielformular fest
Public Sub OpenForm(vForm As String, vIDControl As Control, vIDColumn As String)
If Not IsNull(vIDControl) Then
'Formular wird geöffnet
If vForm <> "frmPumpe" Then
DoCmd.OpenForm vForm, acFormDS
End If
@janikvonrotz
janikvonrotz / Rename imported tables.vbs
Created June 10, 2013 14:50
MSAccess: Rename imported tables #VisualBasic #MSAccess
Public Function TabellenUmbenennen()
' Diese Funktion benennt alle Tabelle um und
' schneidet den vorgestellten Text "dbo_" ab.
Dim tdfLoop
Dim NewName As String
For Each tdfLoop In CurrentDb().TableDefs
If Left(tdfLoop.Name, 4) = "dbo_" Then
@janikvonrotz
janikvonrotz / Save custom id to registry.vbs
Created June 10, 2013 14:50
MSAccess: Save custom id to registry #VisualBasic #MSAccess
Private Sub Form_Load()
'Identifikatoren zur eindeutigen Speicherung in der Registry
Dim PumpeLoadID As Integer
Dim NameOption As String
'Erstellen des eindeutigen Schlüssels
NameOption = "tblpumpe.idPumpe" & Environ("USERNAME")
'Lädt die Einstellung