From gustav at cactus.dk Fri Jun 1 10:44:14 2018 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 1 Jun 2018 15:44:14 +0000 Subject: [AccessD] Unlock/Unprotect VBA Project Message-ID: Hi Stuart et al I found this which uses the advapi32.dll (32/64) to create any of all the common hash methods: https://gist.github.com/jermity/b81622a2b10449c6be99 Code module only: https://gist.githubusercontent.com/jermity/b12e26bc1adb38840099/raw/vba_advapi32_64-bit.vb The SHA1 function returns the same output as that of Stuart's. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af Stuart McLachlan Sendt: 8. maj 2018 02:39 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Unlock/Unprotect VBA Project On 7 May 2018 at 19:24, Bill Benson wrote: > As for dealing with hashes in general, I know nothing of how to do that. A bit of plug-and-play boilerplate for storing passwords with SHA1 See https://tools.ietf.org/html/rfc3174 While it's not the most secure of hashes and you will see internet alarmism about it being broken and not to use it, it's more than secure enough for most purposes. Save credentials: Currentdb.Execute "Insert into tblUsers (Username,PW) Values ('" & txtUsername & "','" & hashstring(txtPassword) & "');" Validate credentials: If hashstring(txtPassword) <> DLookup("PW","tblUsers","Username = '" & txtusername & "'") then Msgbox "Invalid username or password!" The Hashstring stored and compared will always be a 40 hex character string. It would take a determined hacker a looong time to find out what password to enter to match the stored PW value: 3ED8250971CC5F536E7FD7E086EE7EA970896CEB modCrypto (watch for wordwrap) Option Explicit Option Compare Database Private Type FourBytes A As Byte B As Byte C As Byte D As Byte End Type Private Type OneLong L As Long End Type Function hashString(str As String) As String Dim B() As Byte B = StrConv(str, vbFromUnicode) hashString = HexDefaultSHA1(B) End Function Function HexDefaultSHA1(Message() As Byte) As String Dim H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long DefaultSHA1 Message, H1, H2, H3, H4, H5 HexDefaultSHA1 = DecToHex5(H1, H2, H3, H4, H5) End Function Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) xSHA1 Message, &H5A827999, &H6ED9EBA1, &H8F1BBCDC, &HCA62C1D6, H1, H2, H3, H4, H5 End Sub Sub xSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) Dim U As Long, P As Long Dim FB As FourBytes, OL As OneLong Dim i As Integer Dim W(80) As Long Dim A As Long, B As Long, C As Long, D As Long, E As Long Dim T As Long H1 = &H67452301: H2 = &HEFCDAB89: H3 = &H98BADCFE: H4 = &H10325476: H5 = &HC3D2E1F0 U = UBound(Message) + 1: OL.L = U32ShiftLeft3(U): A = U \ &H20000000: LSet FB = OL 'U32ShiftRight29(U) ReDim Preserve Message(0 To (U + 8 And -64) + 63) Message(U) = 128 U = UBound(Message) Message(U - 4) = A Message(U - 3) = FB.D Message(U - 2) = FB.C Message(U - 1) = FB.B Message(U) = FB.A While P < U For i = 0 To 15 FB.D = Message(P) FB.C = Message(P + 1) FB.B = Message(P + 2) FB.A = Message(P + 3) LSet OL = FB W(i) = OL.L P = P + 4 Next i For i = 16 To 79 W(i) = U32RotateLeft1(W(i - 3) Xor W(i - 8) Xor W(i - 14) Xor W(i - 16)) Next i A = H1: B = H2: C = H3: D = H4: E = H5 For i = 0 To 19 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key1), ((B And C) Or ((Not B) And D))) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 20 To 39 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key2), (B Xor C Xor D)) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 40 To 59 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key3), ((B And C) Or (B And D) Or (C And D))) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 60 To 79 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key4), (B Xor C Xor D)) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i H1 = U32Add(H1, A): H2 = U32Add(H2, B): H3 = U32Add(H3, C): H4 = U32Add(H4, D): H5 = U32Add(H5, E) Wend End Sub Function U32Add(ByVal A As Long, ByVal B As Long) As Long If (A Xor B) < 0 Then U32Add = A + B Else U32Add = (A Xor &H80000000) + B Xor &H80000000 End If End Function Function U32ShiftLeft3(ByVal A As Long) As Long U32ShiftLeft3 = (A And &HFFFFFFF) * 8 If A And &H10000000 Then U32ShiftLeft3 = U32ShiftLeft3 Or &H80000000 End Function Function U32ShiftRight29(ByVal A As Long) As Long U32ShiftRight29 = (A And &HE0000000) \ &H20000000 And 7 End Function Function U32RotateLeft1(ByVal A As Long) As Long U32RotateLeft1 = (A And &H3FFFFFFF) * 2 If A And &H40000000 Then U32RotateLeft1 = U32RotateLeft1 Or &H80000000 If A And &H80000000 Then U32RotateLeft1 = U32RotateLeft1 Or 1 End Function Function U32RotateLeft5(ByVal A As Long) As Long U32RotateLeft5 = (A And &H3FFFFFF) * 32 Or (A And &HF8000000) \ &H8000000 And 31 If A And &H4000000 Then U32RotateLeft5 = U32RotateLeft5 Or &H80000000 End Function Function U32RotateLeft30(ByVal A As Long) As Long U32RotateLeft30 = (A And 1) * &H40000000 Or (A And &HFFFC) \ 4 And &H3FFFFFFF If A And 2 Then U32RotateLeft30 = U32RotateLeft30 Or &H80000000 End Function Function DecToHex5(ByVal H1 As Long, ByVal H2 As Long, ByVal H3 As Long, ByVal H4 As Long, ByVal H5 As Long) As String Dim H As String, L As Long DecToHex5 = "0000000000000000000000000000000000000000" H = Hex(H1): L = Len(H): Mid(DecToHex5, 9 - L, L) = H H = Hex(H2): L = Len(H): Mid(DecToHex5, 17 - L, L) = H H = Hex(H3): L = Len(H): Mid(DecToHex5, 25 - L, L) = H H = Hex(H4): L = Len(H): Mid(DecToHex5, 33 - L, L) = H H = Hex(H5): L = Len(H): Mid(DecToHex5, 41 - L, L) = H End Function -- From stuart at lexacorp.com.pg Fri Jun 1 15:49:46 2018 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 02 Jun 2018 06:49:46 +1000 Subject: [AccessD] Unlock/Unprotect VBA Project In-Reply-To: References: Message-ID: <5B11B16A.6016.20FC7F69@stuart.lexacorp.com.pg> Good find! On 1 Jun 2018 at 15:44, Gustav Brock wrote: > Hi Stuart et al > > I found this which uses the advapi32.dll (32/64) to create any of all > the common hash methods: > > https://gist.github.com/jermity/b81622a2b10449c6be99 > > Code module only: > > https://gist.githubusercontent.com/jermity/b12e26bc1adb38840099/raw/vb > a_advapi32_64-bit.vb > > The SHA1 function returns the same output as that of Stuart's. > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > Stuart McLachlan Sendt: 8. maj 2018 02:39 Til: Access Developers > discussion and problem solving Emne: > Re: [AccessD] Unlock/Unprotect VBA Project > > On 7 May 2018 at 19:24, Bill Benson wrote: > > > As for dealing with hashes in general, I know nothing of how to do > > that. > > > A bit of plug-and-play boilerplate for storing passwords with SHA1 See > https://tools.ietf.org/html/rfc3174 > > While it's not the most secure of hashes and you will see internet > alarmism about it being broken and not to use it, it's more than > secure enough for most purposes. > > > Save credentials: > Currentdb.Execute "Insert into tblUsers (Username,PW) Values ('" & > txtUsername & "','" & hashstring(txtPassword) & "');" > > Validate credentials: > > If hashstring(txtPassword) <> DLookup("PW","tblUsers","Username = '" > & txtusername & "'") then Msgbox "Invalid username or password!" > > The Hashstring stored and compared will always be a 40 hex character > string. > > It would take a determined hacker a looong time to find out what > password to enter to match the stored PW value: > 3ED8250971CC5F536E7FD7E086EE7EA970896CEB > > > modCrypto (watch for wordwrap) > > Option Explicit > Option Compare Database > > Private Type FourBytes > A As Byte > B As Byte > C As Byte > D As Byte > End Type > Private Type OneLong > L As Long > End Type > > Function hashString(str As String) As String > Dim B() As Byte > B = StrConv(str, vbFromUnicode) > hashString = HexDefaultSHA1(B) > End Function > > Function HexDefaultSHA1(Message() As Byte) As String > Dim H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long > DefaultSHA1 Message, H1, H2, H3, H4, H5 > HexDefaultSHA1 = DecToHex5(H1, H2, H3, H4, H5) > End Function > > Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, > H4 As Long, H5 As Long) > xSHA1 Message, &H5A827999, &H6ED9EBA1, &H8F1BBCDC, &HCA62C1D6, H1, > H2, H3, > H4, H5 > End Sub > > Sub xSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, > ByVal Key3 As Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As > Long, H4 As Long, H5 As Long) > > Dim U As Long, P As Long > Dim FB As FourBytes, OL As OneLong > Dim i As Integer > Dim W(80) As Long > Dim A As Long, B As Long, C As Long, D As Long, E As Long > Dim T As Long > > H1 = &H67452301: H2 = &HEFCDAB89: H3 = &H98BADCFE: H4 = &H10325476: > H5 = > &HC3D2E1F0 > > U = UBound(Message) + 1: OL.L = U32ShiftLeft3(U): A = U \ &H20000000: > LSet FB = OL > 'U32ShiftRight29(U) > > ReDim Preserve Message(0 To (U + 8 And -64) + 63) > Message(U) = 128 > > U = UBound(Message) > Message(U - 4) = A > Message(U - 3) = FB.D > Message(U - 2) = FB.C > Message(U - 1) = FB.B > Message(U) = FB.A > > While P < U > For i = 0 To 15 > FB.D = Message(P) > FB.C = Message(P + 1) > FB.B = Message(P + 2) > FB.A = Message(P + 3) > LSet OL = FB > W(i) = OL.L > P = P + 4 > Next i > > For i = 16 To 79 > W(i) = U32RotateLeft1(W(i - 3) Xor W(i - 8) Xor W(i - 14) Xor > W(i - 16)) > Next i > > A = H1: B = H2: C = H3: D = H4: E = H5 > > For i = 0 To 19 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key1), ((B And C) > Or ((Not B) And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 20 To 39 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key2), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 40 To 59 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key3), ((B And C) > Or (B And D) Or (C And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 60 To 79 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key4), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > > H1 = U32Add(H1, A): H2 = U32Add(H2, B): H3 = U32Add(H3, C): H4 = > U32Add(H4, D): > H5 = U32Add(H5, E) > Wend > End Sub > > Function U32Add(ByVal A As Long, ByVal B As Long) As Long > If (A Xor B) < 0 Then > U32Add = A + B > Else > U32Add = (A Xor &H80000000) + B Xor &H80000000 > End If > End Function > > Function U32ShiftLeft3(ByVal A As Long) As Long > U32ShiftLeft3 = (A And &HFFFFFFF) * 8 > If A And &H10000000 Then U32ShiftLeft3 = U32ShiftLeft3 Or &H80000000 > End Function > > Function U32ShiftRight29(ByVal A As Long) As Long > U32ShiftRight29 = (A And &HE0000000) \ &H20000000 And 7 > End Function > > Function U32RotateLeft1(ByVal A As Long) As Long > U32RotateLeft1 = (A And &H3FFFFFFF) * 2 > If A And &H40000000 Then U32RotateLeft1 = U32RotateLeft1 Or > &H80000000 If A And &H80000000 Then U32RotateLeft1 = U32RotateLeft1 > Or 1 > End Function > Function U32RotateLeft5(ByVal A As Long) As Long > U32RotateLeft5 = (A And &H3FFFFFF) * 32 Or (A And &HF8000000) \ > &H8000000 And 31 If A And &H4000000 Then U32RotateLeft5 = > U32RotateLeft5 Or &H80000000 > End Function > Function U32RotateLeft30(ByVal A As Long) As Long > U32RotateLeft30 = (A And 1) * &H40000000 Or (A And &HFFFC) \ 4 And > &H3FFFFFFF If A And 2 Then U32RotateLeft30 = U32RotateLeft30 Or > &H80000000 > End Function > > Function DecToHex5(ByVal H1 As Long, ByVal H2 As Long, ByVal H3 As > Long, ByVal H4 As Long, ByVal H5 As Long) As String > Dim H As String, L As Long > DecToHex5 = "0000000000000000000000000000000000000000" > H = Hex(H1): L = Len(H): Mid(DecToHex5, 9 - L, L) = H > H = Hex(H2): L = Len(H): Mid(DecToHex5, 17 - L, L) = H > H = Hex(H3): L = Len(H): Mid(DecToHex5, 25 - L, L) = H > H = Hex(H4): L = Len(H): Mid(DecToHex5, 33 - L, L) = H > H = Hex(H5): L = Len(H): Mid(DecToHex5, 41 - L, L) = H > End Function > > -- > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sat Jun 2 13:31:47 2018 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 2 Jun 2018 12:31:47 -0600 (MDT) Subject: [AccessD] Unlock/Unprotect VBA Project In-Reply-To: References: Message-ID: <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca> Brilliant, Gustav...I will squirrel this away for future reference. Jim ----- Original Message ----- From: "Gustav Brock" To: "Access Developers discussion and problem solving" Sent: Friday, June 1, 2018 8:44:14 AM Subject: Re: [AccessD] Unlock/Unprotect VBA Project Hi Stuart et al I found this which uses the advapi32.dll (32/64) to create any of all the common hash methods: https://gist.github.com/jermity/b81622a2b10449c6be99 Code module only: https://gist.githubusercontent.com/jermity/b12e26bc1adb38840099/raw/vba_advapi32_64-bit.vb The SHA1 function returns the same output as that of Stuart's. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af Stuart McLachlan Sendt: 8. maj 2018 02:39 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Unlock/Unprotect VBA Project On 7 May 2018 at 19:24, Bill Benson wrote: > As for dealing with hashes in general, I know nothing of how to do that. A bit of plug-and-play boilerplate for storing passwords with SHA1 See https://tools.ietf.org/html/rfc3174 While it's not the most secure of hashes and you will see internet alarmism about it being broken and not to use it, it's more than secure enough for most purposes. Save credentials: Currentdb.Execute "Insert into tblUsers (Username,PW) Values ('" & txtUsername & "','" & hashstring(txtPassword) & "');" Validate credentials: If hashstring(txtPassword) <> DLookup("PW","tblUsers","Username = '" & txtusername & "'") then Msgbox "Invalid username or password!" The Hashstring stored and compared will always be a 40 hex character string. It would take a determined hacker a looong time to find out what password to enter to match the stored PW value: 3ED8250971CC5F536E7FD7E086EE7EA970896CEB modCrypto (watch for wordwrap) Option Explicit Option Compare Database Private Type FourBytes A As Byte B As Byte C As Byte D As Byte End Type Private Type OneLong L As Long End Type Function hashString(str As String) As String Dim B() As Byte B = StrConv(str, vbFromUnicode) hashString = HexDefaultSHA1(B) End Function Function HexDefaultSHA1(Message() As Byte) As String Dim H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long DefaultSHA1 Message, H1, H2, H3, H4, H5 HexDefaultSHA1 = DecToHex5(H1, H2, H3, H4, H5) End Function Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) xSHA1 Message, &H5A827999, &H6ED9EBA1, &H8F1BBCDC, &HCA62C1D6, H1, H2, H3, H4, H5 End Sub Sub xSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) Dim U As Long, P As Long Dim FB As FourBytes, OL As OneLong Dim i As Integer Dim W(80) As Long Dim A As Long, B As Long, C As Long, D As Long, E As Long Dim T As Long H1 = &H67452301: H2 = &HEFCDAB89: H3 = &H98BADCFE: H4 = &H10325476: H5 = &HC3D2E1F0 U = UBound(Message) + 1: OL.L = U32ShiftLeft3(U): A = U \ &H20000000: LSet FB = OL 'U32ShiftRight29(U) ReDim Preserve Message(0 To (U + 8 And -64) + 63) Message(U) = 128 U = UBound(Message) Message(U - 4) = A Message(U - 3) = FB.D Message(U - 2) = FB.C Message(U - 1) = FB.B Message(U) = FB.A While P < U For i = 0 To 15 FB.D = Message(P) FB.C = Message(P + 1) FB.B = Message(P + 2) FB.A = Message(P + 3) LSet OL = FB W(i) = OL.L P = P + 4 Next i For i = 16 To 79 W(i) = U32RotateLeft1(W(i - 3) Xor W(i - 8) Xor W(i - 14) Xor W(i - 16)) Next i A = H1: B = H2: C = H3: D = H4: E = H5 For i = 0 To 19 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key1), ((B And C) Or ((Not B) And D))) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 20 To 39 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key2), (B Xor C Xor D)) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 40 To 59 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key3), ((B And C) Or (B And D) Or (C And D))) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i For i = 60 To 79 T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), Key4), (B Xor C Xor D)) E = D: D = C: C = U32RotateLeft30(B): B = A: A = T Next i H1 = U32Add(H1, A): H2 = U32Add(H2, B): H3 = U32Add(H3, C): H4 = U32Add(H4, D): H5 = U32Add(H5, E) Wend End Sub Function U32Add(ByVal A As Long, ByVal B As Long) As Long If (A Xor B) < 0 Then U32Add = A + B Else U32Add = (A Xor &H80000000) + B Xor &H80000000 End If End Function Function U32ShiftLeft3(ByVal A As Long) As Long U32ShiftLeft3 = (A And &HFFFFFFF) * 8 If A And &H10000000 Then U32ShiftLeft3 = U32ShiftLeft3 Or &H80000000 End Function Function U32ShiftRight29(ByVal A As Long) As Long U32ShiftRight29 = (A And &HE0000000) \ &H20000000 And 7 End Function Function U32RotateLeft1(ByVal A As Long) As Long U32RotateLeft1 = (A And &H3FFFFFFF) * 2 If A And &H40000000 Then U32RotateLeft1 = U32RotateLeft1 Or &H80000000 If A And &H80000000 Then U32RotateLeft1 = U32RotateLeft1 Or 1 End Function Function U32RotateLeft5(ByVal A As Long) As Long U32RotateLeft5 = (A And &H3FFFFFF) * 32 Or (A And &HF8000000) \ &H8000000 And 31 If A And &H4000000 Then U32RotateLeft5 = U32RotateLeft5 Or &H80000000 End Function Function U32RotateLeft30(ByVal A As Long) As Long U32RotateLeft30 = (A And 1) * &H40000000 Or (A And &HFFFC) \ 4 And &H3FFFFFFF If A And 2 Then U32RotateLeft30 = U32RotateLeft30 Or &H80000000 End Function Function DecToHex5(ByVal H1 As Long, ByVal H2 As Long, ByVal H3 As Long, ByVal H4 As Long, ByVal H5 As Long) As String Dim H As String, L As Long DecToHex5 = "0000000000000000000000000000000000000000" H = Hex(H1): L = Len(H): Mid(DecToHex5, 9 - L, L) = H H = Hex(H2): L = Len(H): Mid(DecToHex5, 17 - L, L) = H H = Hex(H3): L = Len(H): Mid(DecToHex5, 25 - L, L) = H H = Hex(H4): L = Len(H): Mid(DecToHex5, 33 - L, L) = H H = Hex(H5): L = Len(H): Mid(DecToHex5, 41 - L, L) = H End Function -- -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sat Jun 2 15:20:18 2018 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 2 Jun 2018 16:20:18 -0400 Subject: [AccessD] Unlock/Unprotect VBA Project In-Reply-To: <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca> References: <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca> Message-ID: I just wish I understood better what this does, how to incorporate it into my applications. I'll just have to study the links. The whole notion of hashes has eluded me every time I have tried to understand it. Just a severe mental block. I am probably not a serious computer programmer, just a power user of Excel who learned to write macros in his spare time. Encryption, hashes, etc just never got through to me because I didn't get into "hacking" early in life mayne. On Sat, Jun 2, 2018, 2:33 PM Jim Lawrence wrote: > Brilliant, Gustav...I will squirrel this away for future reference. > > Jim > > ----- Original Message ----- > From: "Gustav Brock" > To: "Access Developers discussion and problem solving" < > accessd at databaseadvisors.com> > Sent: Friday, June 1, 2018 8:44:14 AM > Subject: Re: [AccessD] Unlock/Unprotect VBA Project > > Hi Stuart et al > > I found this which uses the advapi32.dll (32/64) to create any of all the > common hash methods: > > https://gist.github.com/jermity/b81622a2b10449c6be99 > > Code module only: > > > https://gist.githubusercontent.com/jermity/b12e26bc1adb38840099/raw/vba_advapi32_64-bit.vb > > The SHA1 function returns the same output as that of Stuart's. > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > Stuart McLachlan > Sendt: 8. maj 2018 02:39 > Til: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Emne: Re: [AccessD] Unlock/Unprotect VBA Project > > On 7 May 2018 at 19:24, Bill Benson wrote: > > > As for dealing with hashes in general, I know nothing of how to do > that. > > > A bit of plug-and-play boilerplate for storing passwords with SHA1 See > https://tools.ietf.org/html/rfc3174 > > While it's not the most secure of hashes and you will see internet > alarmism about it being broken and not to use it, it's more than secure > enough for most purposes. > > > Save credentials: > Currentdb.Execute "Insert into tblUsers (Username,PW) Values ('" & > txtUsername & "','" & > hashstring(txtPassword) & "');" > > Validate credentials: > > If hashstring(txtPassword) <> DLookup("PW","tblUsers","Username = '" & > txtusername & "'") > then Msgbox "Invalid username or password!" > > The Hashstring stored and compared will always be a 40 hex character > string. > > It would take a determined hacker a looong time to find out what password > to enter to match > the stored PW value: > 3ED8250971CC5F536E7FD7E086EE7EA970896CEB > > > modCrypto (watch for wordwrap) > > Option Explicit > Option Compare Database > > Private Type FourBytes > A As Byte > B As Byte > C As Byte > D As Byte > End Type > Private Type OneLong > L As Long > End Type > > Function hashString(str As String) As String > Dim B() As Byte > B = StrConv(str, vbFromUnicode) > hashString = HexDefaultSHA1(B) > End Function > > Function HexDefaultSHA1(Message() As Byte) As String > Dim H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long > DefaultSHA1 Message, H1, H2, H3, H4, H5 > HexDefaultSHA1 = DecToHex5(H1, H2, H3, H4, H5) > End Function > > Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 > As Long, > H5 As Long) > xSHA1 Message, &H5A827999, &H6ED9EBA1, &H8F1BBCDC, &HCA62C1D6, H1, H2, > H3, > H4, H5 > End Sub > > Sub xSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal > Key3 As > Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Long, > H5 As Long) > > Dim U As Long, P As Long > Dim FB As FourBytes, OL As OneLong > Dim i As Integer > Dim W(80) As Long > Dim A As Long, B As Long, C As Long, D As Long, E As Long > Dim T As Long > > H1 = &H67452301: H2 = &HEFCDAB89: H3 = &H98BADCFE: H4 = &H10325476: H5 = > &HC3D2E1F0 > > U = UBound(Message) + 1: OL.L = U32ShiftLeft3(U): A = U \ &H20000000: > LSet FB = OL > 'U32ShiftRight29(U) > > ReDim Preserve Message(0 To (U + 8 And -64) + 63) > Message(U) = 128 > > U = UBound(Message) > Message(U - 4) = A > Message(U - 3) = FB.D > Message(U - 2) = FB.C > Message(U - 1) = FB.B > Message(U) = FB.A > > While P < U > For i = 0 To 15 > FB.D = Message(P) > FB.C = Message(P + 1) > FB.B = Message(P + 2) > FB.A = Message(P + 3) > LSet OL = FB > W(i) = OL.L > P = P + 4 > Next i > > For i = 16 To 79 > W(i) = U32RotateLeft1(W(i - 3) Xor W(i - 8) Xor W(i - 14) Xor W(i > - 16)) > Next i > > A = H1: B = H2: C = H3: D = H4: E = H5 > > For i = 0 To 19 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key1), ((B And C) > Or ((Not B) And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 20 To 39 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key2), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 40 To 59 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key3), ((B And C) > Or (B And D) Or (C And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 60 To 79 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key4), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > > H1 = U32Add(H1, A): H2 = U32Add(H2, B): H3 = U32Add(H3, C): H4 = > U32Add(H4, D): > H5 = U32Add(H5, E) > Wend > End Sub > > Function U32Add(ByVal A As Long, ByVal B As Long) As Long > If (A Xor B) < 0 Then > U32Add = A + B > Else > U32Add = (A Xor &H80000000) + B Xor &H80000000 > End If > End Function > > Function U32ShiftLeft3(ByVal A As Long) As Long > U32ShiftLeft3 = (A And &HFFFFFFF) * 8 > If A And &H10000000 Then U32ShiftLeft3 = U32ShiftLeft3 Or &H80000000 > End Function > > Function U32ShiftRight29(ByVal A As Long) As Long > U32ShiftRight29 = (A And &HE0000000) \ &H20000000 And 7 > End Function > > Function U32RotateLeft1(ByVal A As Long) As Long > U32RotateLeft1 = (A And &H3FFFFFFF) * 2 > If A And &H40000000 Then U32RotateLeft1 = U32RotateLeft1 Or &H80000000 > If A And &H80000000 Then U32RotateLeft1 = U32RotateLeft1 Or 1 > End Function > Function U32RotateLeft5(ByVal A As Long) As Long > U32RotateLeft5 = (A And &H3FFFFFF) * 32 Or (A And &HF8000000) \ &H8000000 > And 31 > If A And &H4000000 Then U32RotateLeft5 = U32RotateLeft5 Or &H80000000 > End Function > Function U32RotateLeft30(ByVal A As Long) As Long > U32RotateLeft30 = (A And 1) * &H40000000 Or (A And &HFFFC) \ 4 And > &H3FFFFFFF > If A And 2 Then U32RotateLeft30 = U32RotateLeft30 Or &H80000000 > End Function > > Function DecToHex5(ByVal H1 As Long, ByVal H2 As Long, ByVal H3 As Long, > ByVal H4 As > Long, ByVal H5 As Long) As String > Dim H As String, L As Long > DecToHex5 = "0000000000000000000000000000000000000000" > H = Hex(H1): L = Len(H): Mid(DecToHex5, 9 - L, L) = H > H = Hex(H2): L = Len(H): Mid(DecToHex5, 17 - L, L) = H > H = Hex(H3): L = Len(H): Mid(DecToHex5, 25 - L, L) = H > H = Hex(H4): L = Len(H): Mid(DecToHex5, 33 - L, L) = H > H = Hex(H5): L = Len(H): Mid(DecToHex5, 41 - L, L) = H > End Function > > -- > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sat Jun 2 17:12:25 2018 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 03 Jun 2018 08:12:25 +1000 Subject: [AccessD] Unlock/Unprotect VBA Project In-Reply-To: References: , <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca>, Message-ID: <5B131649.9921.266E884B@stuart.lexacorp.com.pg> To put it into simple terms. A Hash is a mapping of arbitrary data to a fixed string of bits. In its simplest form it is just a "checksum" like the last digit or a credit card number of freight container number. In those cases a simple calculation based on the preceding digits results in a single digit which is appended to the number. That means that your can do the calcuation when someone enters a number and in 9 out of ten cases of a miss-entered number, it will flag the error. Modern cryptographic hashes are more complex and use algorithms that compute a much larger checksum. (256 or more bits) so that there is a much smaller chance of any two initial values will end up with the same hash value. There is always a chance of collision since you are effectively mapping an infinite number of different strings to a fixed number of hashes - but with 256, 512 etc bits in the hash, the chances are vanishngly small. Cryptographic hashes have another couple of atributes: 1. A small change in the initial string results in large changes in the hash value 2. It is very difficult to reverse engineer the hash to come up with any arbitrary string that hashes to that value. The end result is that you can store the hash of a password, a message, a file or whatever and even if someone gets their hands on the hash, they can't generate another password, message of file that matches that hash, but if someone has the original password, message of file, it is easy to validate it by re-hashing it and comparing the result to the stored hash. So - if you store passwords in your database and someone hacks it, they have the password and can log in with it. If you store a hash of the password, the hacker gains nothing by acquiring the hash - they can't use it to log in. Only someone with the actual password that hashes to that value can log in. On 2 Jun 2018 at 16:20, Bill Benson wrote: > I just wish I understood better what this does, how to incorporate it > into my applications. I'll just have to study the links. The whole > notion of hashes has eluded me every time I have tried to understand > it. Just a severe mental block. I am probably not a serious computer > programmer, just a power user of Excel who learned to write macros in > his spare time. Encryption, hashes, etc just never got through to me > because I didn't get into "hacking" early in life mayne. > From rockysmolin at bchacc.com Sat Jun 2 17:21:32 2018 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 2 Jun 2018 15:21:32 -0700 Subject: [AccessD] Unlock/Unprotect VBA Project In-Reply-To: References: <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca> Message-ID: <000c01d3fac0$0fa3e360$2eebaa20$@bchacc.com> But are you working with applications that require that level of security? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Saturday, June 02, 2018 1:20 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Unlock/Unprotect VBA Project I just wish I understood better what this does, how to incorporate it into my applications. I'll just have to study the links. The whole notion of hashes has eluded me every time I have tried to understand it. Just a severe mental block. I am probably not a serious computer programmer, just a power user of Excel who learned to write macros in his spare time. Encryption, hashes, etc just never got through to me because I didn't get into "hacking" early in life mayne. On Sat, Jun 2, 2018, 2:33 PM Jim Lawrence wrote: > Brilliant, Gustav...I will squirrel this away for future reference. > > Jim > > ----- Original Message ----- > From: "Gustav Brock" > To: "Access Developers discussion and problem solving" < > accessd at databaseadvisors.com> > Sent: Friday, June 1, 2018 8:44:14 AM > Subject: Re: [AccessD] Unlock/Unprotect VBA Project > > Hi Stuart et al > > I found this which uses the advapi32.dll (32/64) to create any of all the > common hash methods: > > https://gist.github.com/jermity/b81622a2b10449c6be99 > > Code module only: > > > https://gist.githubusercontent.com/jermity/b12e26bc1adb38840099/raw/vba_advapi32_64-bit.vb > > The SHA1 function returns the same output as that of Stuart's. > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > Stuart McLachlan > Sendt: 8. maj 2018 02:39 > Til: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Emne: Re: [AccessD] Unlock/Unprotect VBA Project > > On 7 May 2018 at 19:24, Bill Benson wrote: > > > As for dealing with hashes in general, I know nothing of how to do > that. > > > A bit of plug-and-play boilerplate for storing passwords with SHA1 See > https://tools.ietf.org/html/rfc3174 > > While it's not the most secure of hashes and you will see internet > alarmism about it being broken and not to use it, it's more than secure > enough for most purposes. > > > Save credentials: > Currentdb.Execute "Insert into tblUsers (Username,PW) Values ('" & > txtUsername & "','" & > hashstring(txtPassword) & "');" > > Validate credentials: > > If hashstring(txtPassword) <> DLookup("PW","tblUsers","Username = '" & > txtusername & "'") > then Msgbox "Invalid username or password!" > > The Hashstring stored and compared will always be a 40 hex character > string. > > It would take a determined hacker a looong time to find out what password > to enter to match > the stored PW value: > 3ED8250971CC5F536E7FD7E086EE7EA970896CEB > > > modCrypto (watch for wordwrap) > > Option Explicit > Option Compare Database > > Private Type FourBytes > A As Byte > B As Byte > C As Byte > D As Byte > End Type > Private Type OneLong > L As Long > End Type > > Function hashString(str As String) As String > Dim B() As Byte > B = StrConv(str, vbFromUnicode) > hashString = HexDefaultSHA1(B) > End Function > > Function HexDefaultSHA1(Message() As Byte) As String > Dim H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long > DefaultSHA1 Message, H1, H2, H3, H4, H5 > HexDefaultSHA1 = DecToHex5(H1, H2, H3, H4, H5) > End Function > > Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 > As Long, > H5 As Long) > xSHA1 Message, &H5A827999, &H6ED9EBA1, &H8F1BBCDC, &HCA62C1D6, H1, H2, > H3, > H4, H5 > End Sub > > Sub xSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal > Key3 As > Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Long, > H5 As Long) > > Dim U As Long, P As Long > Dim FB As FourBytes, OL As OneLong > Dim i As Integer > Dim W(80) As Long > Dim A As Long, B As Long, C As Long, D As Long, E As Long > Dim T As Long > > H1 = &H67452301: H2 = &HEFCDAB89: H3 = &H98BADCFE: H4 = &H10325476: H5 = > &HC3D2E1F0 > > U = UBound(Message) + 1: OL.L = U32ShiftLeft3(U): A = U \ &H20000000: > LSet FB = OL > 'U32ShiftRight29(U) > > ReDim Preserve Message(0 To (U + 8 And -64) + 63) > Message(U) = 128 > > U = UBound(Message) > Message(U - 4) = A > Message(U - 3) = FB.D > Message(U - 2) = FB.C > Message(U - 1) = FB.B > Message(U) = FB.A > > While P < U > For i = 0 To 15 > FB.D = Message(P) > FB.C = Message(P + 1) > FB.B = Message(P + 2) > FB.A = Message(P + 3) > LSet OL = FB > W(i) = OL.L > P = P + 4 > Next i > > For i = 16 To 79 > W(i) = U32RotateLeft1(W(i - 3) Xor W(i - 8) Xor W(i - 14) Xor W(i > - 16)) > Next i > > A = H1: B = H2: C = H3: D = H4: E = H5 > > For i = 0 To 19 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key1), ((B And C) > Or ((Not B) And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 20 To 39 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key2), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 40 To 59 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key3), ((B And C) > Or (B And D) Or (C And D))) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > For i = 60 To 79 > T = U32Add(U32Add(U32Add(U32Add(U32RotateLeft5(A), E), W(i)), > Key4), (B Xor C > Xor D)) > E = D: D = C: C = U32RotateLeft30(B): B = A: A = T > Next i > > H1 = U32Add(H1, A): H2 = U32Add(H2, B): H3 = U32Add(H3, C): H4 = > U32Add(H4, D): > H5 = U32Add(H5, E) > Wend > End Sub > > Function U32Add(ByVal A As Long, ByVal B As Long) As Long > If (A Xor B) < 0 Then > U32Add = A + B > Else > U32Add = (A Xor &H80000000) + B Xor &H80000000 > End If > End Function > > Function U32ShiftLeft3(ByVal A As Long) As Long > U32ShiftLeft3 = (A And &HFFFFFFF) * 8 > If A And &H10000000 Then U32ShiftLeft3 = U32ShiftLeft3 Or &H80000000 > End Function > > Function U32ShiftRight29(ByVal A As Long) As Long > U32ShiftRight29 = (A And &HE0000000) \ &H20000000 And 7 > End Function > > Function U32RotateLeft1(ByVal A As Long) As Long > U32RotateLeft1 = (A And &H3FFFFFFF) * 2 > If A And &H40000000 Then U32RotateLeft1 = U32RotateLeft1 Or &H80000000 > If A And &H80000000 Then U32RotateLeft1 = U32RotateLeft1 Or 1 > End Function > Function U32RotateLeft5(ByVal A As Long) As Long > U32RotateLeft5 = (A And &H3FFFFFF) * 32 Or (A And &HF8000000) \ &H8000000 > And 31 > If A And &H4000000 Then U32RotateLeft5 = U32RotateLeft5 Or &H80000000 > End Function > Function U32RotateLeft30(ByVal A As Long) As Long > U32RotateLeft30 = (A And 1) * &H40000000 Or (A And &HFFFC) \ 4 And > &H3FFFFFFF > If A And 2 Then U32RotateLeft30 = U32RotateLeft30 Or &H80000000 > End Function > > Function DecToHex5(ByVal H1 As Long, ByVal H2 As Long, ByVal H3 As Long, > ByVal H4 As > Long, ByVal H5 As Long) As String > Dim H As String, L As Long > DecToHex5 = "0000000000000000000000000000000000000000" > H = Hex(H1): L = Len(H): Mid(DecToHex5, 9 - L, L) = H > H = Hex(H2): L = Len(H): Mid(DecToHex5, 17 - L, L) = H > H = Hex(H3): L = Len(H): Mid(DecToHex5, 25 - L, L) = H > H = Hex(H4): L = Len(H): Mid(DecToHex5, 33 - L, L) = H > H = Hex(H5): L = Len(H): Mid(DecToHex5, 41 - L, L) = H > End Function > > -- > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Sun Jun 3 17:37:37 2018 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jun 2018 16:37:37 -0600 (MDT) Subject: [AccessD] Weather In-Reply-To: <000c01d3fac0$0fa3e360$2eebaa20$@bchacc.com> References: <898628746.125351694.1527964307778.JavaMail.zimbra@shaw.ca> <000c01d3fac0$0fa3e360$2eebaa20$@bchacc.com> Message-ID: <864057491.132313891.1528065457055.JavaMail.zimbra@shaw.ca> This morning I was chased indoors, as the sky opened up and it rained and it has kept raining....... At least everything in the garden is beautifully green and lush. Now it is a rush between what I planted and what vegetation has volunteered its services. Jim From rockysmolin at bchacc.com Mon Jun 25 00:13:12 2018 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 24 Jun 2018 22:13:12 -0700 Subject: [AccessD] Property Sheet Shows In Form View Message-ID: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> Dear List: I have an app in which the property sheet, if visible in design view, remains visible in form view. And can't be closed or minimized. I can work around by remembering to close the property sheet before going to Form view. But that's PITA. Is there a setting which governs this behavior? MTIA Rocky From ssharkins at gmail.com Mon Jun 25 07:27:52 2018 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 25 Jun 2018 08:27:52 -0400 Subject: [AccessD] Property Sheet Shows In Form View In-Reply-To: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> References: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> Message-ID: <018101d40c7f$f06fb6a0$d14f23e0$@gmail.com> Look for the AllowDesignChanges property and see if it's All Views -- if so, chane it to Design View Only. Susan H. Dear List: I have an app in which the property sheet, if visible in design view, remains visible in form view. And can't be closed or minimized. I can work around by remembering to close the property sheet before going to Form view. But that's PITA. Is there a setting which governs this behavior? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jun 25 08:23:29 2018 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 25 Jun 2018 06:23:29 -0700 Subject: [AccessD] Property Sheet Shows In Form View In-Reply-To: <018101d40c7f$f06fb6a0$d14f23e0$@gmail.com> References: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> <018101d40c7f$f06fb6a0$d14f23e0$@gmail.com> Message-ID: <001a01d40c87$b5194f00$1f4bed00$@bchacc.com> Allow Design Changes no longer appears in the property sheet. It's always defaulted to Design View Only so I've seen it but never had to change it. But it's gone now. I saw a chunk of code in a link that sets all the forms in your app to Allow Design Changes Design View Only. I may try that if there's no other way. Unless that property appears somewhere else. I looked in options but not there. Does it show in your property sheet? Rocky -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, June 25, 2018 5:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Property Sheet Shows In Form View Look for the AllowDesignChanges property and see if it's All Views -- if so, chane it to Design View Only. Susan H. Dear List: I have an app in which the property sheet, if visible in design view, remains visible in form view. And can't be closed or minimized. I can work around by remembering to close the property sheet before going to Form view. But that's PITA. Is there a setting which governs this behavior? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Mon Jun 25 08:33:44 2018 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 25 Jun 2018 09:33:44 -0400 Subject: [AccessD] Property Sheet Shows In Form View In-Reply-To: <001a01d40c87$b5194f00$1f4bed00$@bchacc.com> References: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> <018101d40c7f$f06fb6a0$d14f23e0$@gmail.com> <001a01d40c87$b5194f00$1f4bed00$@bchacc.com> Message-ID: <007701d40c89$24443650$6ccca2f0$@gmail.com> You're right -- I'm using Access 365 (2016) and it isn't there. A little research -- it's been replaced with Allow Layout View -- I thought when I saw it that might be the case. However, I can't say that it works exactly the same. Susan H. Allow Design Changes no longer appears in the property sheet. It's always defaulted to Design View Only so I've seen it but never had to change it. But it's gone now. I saw a chunk of code in a link that sets all the forms in your app to Allow Design Changes Design View Only. I may try that if there's no other way. Unless that property appears somewhere else. I looked in options but not there. Does it show in your property sheet? Rocky -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, June 25, 2018 5:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Property Sheet Shows In Form View Look for the AllowDesignChanges property and see if it's All Views -- if so, chane it to Design View Only. Susan H. Dear List: I have an app in which the property sheet, if visible in design view, remains visible in form view. And can't be closed or minimized. I can work around by remembering to close the property sheet before going to Form view. But that's PITA. Is there a setting which governs this behavior? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jun 25 09:43:02 2018 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 25 Jun 2018 07:43:02 -0700 Subject: [AccessD] Property Sheet Shows In Form View In-Reply-To: <007701d40c89$24443650$6ccca2f0$@gmail.com> References: <000001d40c43$3720b6e0$a56224a0$@bchacc.com> <018101d40c7f$f06fb6a0$d14f23e0$@gmail.com> <001a01d40c87$b5194f00$1f4bed00$@bchacc.com> <007701d40c89$24443650$6ccca2f0$@gmail.com> Message-ID: <002e01d40c92$d2242650$766c72f0$@bchacc.com> I tried it but it didn't make the property sheet go away in Form View. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, June 25, 2018 6:34 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Property Sheet Shows In Form View You're right -- I'm using Access 365 (2016) and it isn't there. A little research -- it's been replaced with Allow Layout View -- I thought when I saw it that might be the case. However, I can't say that it works exactly the same. Susan H. Allow Design Changes no longer appears in the property sheet. It's always defaulted to Design View Only so I've seen it but never had to change it. But it's gone now. I saw a chunk of code in a link that sets all the forms in your app to Allow Design Changes Design View Only. I may try that if there's no other way. Unless that property appears somewhere else. I looked in options but not there. Does it show in your property sheet? Rocky -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, June 25, 2018 5:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Property Sheet Shows In Form View Look for the AllowDesignChanges property and see if it's All Views -- if so, chane it to Design View Only. Susan H. Dear List: I have an app in which the property sheet, if visible in design view, remains visible in form view. And can't be closed or minimized. I can work around by remembering to close the property sheet before going to Form view. But that's PITA. Is there a setting which governs this behavior? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From paul.hartland at googlemail.com Fri Jun 29 01:14:28 2018 From: paul.hartland at googlemail.com (Paul Hartland) Date: Fri, 29 Jun 2018 07:14:28 +0100 Subject: [AccessD] Visual Studio Community Message-ID: To all, I used Visual Studio Express 2015 to develop/maintain a couple of little applications for use with the company I work for, am I right in assuming I can install Visual Studio Community to carry on developing/maintaining these applications ? I have read the licensing terms and it seems that I can, anyone know of any other restrictions ? -- Paul Hartland paul.hartland at googlemail.com From gustav at cactus.dk Fri Jun 29 01:34:45 2018 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 29 Jun 2018 06:34:45 +0000 Subject: [AccessD] Visual Studio Community Message-ID: Hi Paul Yes, the Community edition is free for anyone to use. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af Paul Hartland via AccessD Sendt: 29. juni 2018 08:14 Til: Access List ; Development in Visual Studio Cc: Paul Hartland Emne: [AccessD] Visual Studio Community To all, I used Visual Studio Express 2015 to develop/maintain a couple of little applications for use with the company I work for, am I right in assuming I can install Visual Studio Community to carry on developing/maintaining these applications ? I have read the licensing terms and it seems that I can, anyone know of any other restrictions ? -- Paul Hartland paul.hartland at googlemail.com From paul.hartland at googlemail.com Fri Jun 29 01:41:15 2018 From: paul.hartland at googlemail.com (Paul Hartland) Date: Fri, 29 Jun 2018 07:41:15 +0100 Subject: [AccessD] Visual Studio Community In-Reply-To: References: Message-ID: Thank you Gustav, thought it would be, but just wanted to make doubly sure..... Paul On 29 June 2018 at 07:34, Gustav Brock wrote: > Hi Paul > > Yes, the Community edition is free for anyone to use. > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > Paul Hartland via AccessD > Sendt: 29. juni 2018 08:14 > Til: Access List ; Development in Visual > Studio > Cc: Paul Hartland > Emne: [AccessD] Visual Studio Community > > To all, > > I used Visual Studio Express 2015 to develop/maintain a couple of little > applications for use with the company I work for, am I right in assuming I > can install Visual Studio Community to carry on developing/maintaining > these applications ? > > I have read the licensing terms and it seems that I can, anyone know of > any other restrictions ? > > > > -- > Paul Hartland > paul.hartland at googlemail.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Paul Hartland paul.hartland at googlemail.com From df.waters at outlook.com Fri Jun 29 08:14:15 2018 From: df.waters at outlook.com (Dan Waters) Date: Fri, 29 Jun 2018 13:14:15 +0000 Subject: [AccessD] Visual Studio Community In-Reply-To: References: Message-ID: Hi Paul, I've been using VS Community for several years and the licensing does have some restrictions: >From VS Licensing document https://www.microsoft.com/en-us/download/details.aspx?id=13350 INDIVIDUAL DEVELOPERS Any individual developer can use Visual Studio Community, to create their own free or paid apps. ORGANIZATIONS An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects. For all other usage scenarios: In non-enterprise organizations up to 5 users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or > $1M in annual revenue) no use is permitted for employees as well as contractors beyond the open source, academic research and classroom learning environment scenarios described above. So it just depends on the circumstances of your company. PS - as you might imagine there are more details but this is the heart of it. Hope this helps! Dan -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland via AccessD Sent: June 29, 2018 01:41 To: Access Developers discussion and problem solving Cc: Paul Hartland Subject: Re: [AccessD] Visual Studio Community Thank you Gustav, thought it would be, but just wanted to make doubly sure..... Paul On 29 June 2018 at 07:34, Gustav Brock wrote: > Hi Paul > > Yes, the Community edition is free for anyone to use. > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > Paul Hartland via AccessD > Sendt: 29. juni 2018 08:14 > Til: Access List ; Development in Visual > Studio > Cc: Paul Hartland > Emne: [AccessD] Visual Studio Community > > To all, > > I used Visual Studio Express 2015 to develop/maintain a couple of little > applications for use with the company I work for, am I right in assuming I > can install Visual Studio Community to carry on developing/maintaining > these applications ? > > I have read the licensing terms and it seems that I can, anyone know of > any other restrictions ? > > > > -- > Paul Hartland > paul.hartland at googlemail.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Paul Hartland paul.hartland at googlemail.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From paul.hartland at googlemail.com Fri Jun 29 08:22:45 2018 From: paul.hartland at googlemail.com (Paul Hartland) Date: Fri, 29 Jun 2018 14:22:45 +0100 Subject: [AccessD] Visual Studio Community In-Reply-To: References: Message-ID: Thanks Dan On Fri, 29 Jun 2018, 14:15 Dan Waters, wrote: > Hi Paul, > > I've been using VS Community for several years and the licensing does have > some restrictions: > > From VS Licensing document > https://www.microsoft.com/en-us/download/details.aspx?id=13350 > > INDIVIDUAL DEVELOPERS > Any individual developer can use Visual Studio Community, to create > their own free or paid apps. > > ORGANIZATIONS > An unlimited number of users within an organization can use Visual > Studio Community for the following scenarios: > in a classroom learning environment, for academic research, or for > contributing to open source projects. > For all other usage scenarios: In non-enterprise organizations up to 5 > users can use Visual Studio Community. In > enterprise organizations (meaning those with >250 PCs or > $1M in > annual revenue) no use is permitted for > employees as well as contractors beyond the open source, academic > research and classroom learning environment > scenarios described above. > > So it just depends on the circumstances of your company. > > PS - as you might imagine there are more details but this is the heart of > it. > > Hope this helps! > Dan > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Paul Hartland via AccessD > Sent: June 29, 2018 01:41 > To: Access Developers discussion and problem solving > Cc: Paul Hartland > Subject: Re: [AccessD] Visual Studio Community > > Thank you Gustav, thought it would be, but just wanted to make doubly > sure..... > > Paul > > On 29 June 2018 at 07:34, Gustav Brock wrote: > > > Hi Paul > > > > Yes, the Community edition is free for anyone to use. > > > > /gustav > > > > -----Oprindelig meddelelse----- > > Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af > > Paul Hartland via AccessD > > Sendt: 29. juni 2018 08:14 > > Til: Access List ; Development in Visual > > Studio > > Cc: Paul Hartland > > Emne: [AccessD] Visual Studio Community > > > > To all, > > > > I used Visual Studio Express 2015 to develop/maintain a couple of little > > applications for use with the company I work for, am I right in assuming > I > > can install Visual Studio Community to carry on developing/maintaining > > these applications ? > > > > I have read the licensing terms and it seems that I can, anyone know of > > any other restrictions ? > > > > > > > > -- > > Paul Hartland > > paul.hartland at googlemail.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > > -- > Paul Hartland > paul.hartland at googlemail.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >