אופיס 365 מודול אקסס שמבקש רישום מהרגיסטרי

  • הוסף לסימניות
  • #1
בס"ד

אני זקוק למודול באקסס שפתיחת הקובץ מבקש מהרגיסטרי נתונים
מי שיש לו כזה ויוכל להעביר לי את זה אני יודה לו מאד.
 
  • הוסף לסימניות
  • #3
חסום לי! אפשר במגיקוד ? (עם יש שם הדרכה כלשהי עדיף גם אותה בפידיאף)
תודה!
 
  • הוסף לסימניות
  • #5
תבדוק את זה:
קוד:
Sub ChangeCommentWith()

Dim myRegKey As String
Dim myValue As String
Dim myFileAs As String
Dim myAnswer As Integer
 
  'get registry key to work with
  myRegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\MailSettings\MarkComments"
  If myRegKey = "" Then Exit Sub
  'check if key exists
  If RegKeyExists(myRegKey) = True Then
    'key exists, read it
    myValue = RegKeyRead(myRegKey)
    If myValue = 1 Then myValue = "0" Else myValue = 1
      Else
    myValue = 1
   End If
 
    If myValue <> "" Then
      RegKeySave myRegKey, myValue
      MsgBox "Registry key set to " & myValue
  End If

End Sub

'reads the value for the registry key i_RegKey
'if the key cannot be found, the return value is ""
Function RegKeyRead(i_RegKey As String) As String
Dim myWS As Object

  On Error Resume Next
  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'read key from registry
  RegKeyRead = myWS.RegRead(i_RegKey)
End Function

'sets the registry key i_RegKey to the
'value i_Value with type i_Type
'if i_Type is omitted, the value will be saved as string
'if i_RegKey wasn't found, a new registry key will be created

' change REG_DWORD to the correct key type
Sub RegKeySave(i_RegKey As String, _
              i_Value As String, _
     Optional i_Type As String = "REG_DWORD")
Dim myWS As Object

  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'write registry key
  myWS.RegWrite i_RegKey, i_Value, i_Type

End Sub

'returns True if the registry key i_RegKey was found
'and False if not
Function RegKeyExists(i_RegKey As String) As Boolean
Dim myWS As Object

  On Error GoTo ErrorHandler
  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'try to read the registry key
  myWS.RegRead i_RegKey
  'key was found
  RegKeyExists = True
  Exit Function
 
ErrorHandler:
  'key was not found
  RegKeyExists = False
End Function

מקור
 
נערך לאחרונה ב:
  • הוסף לסימניות
  • #6
תבדוק את זה:
קוד:
Sub ChangeCommentWith()

Dim myRegKey As String
Dim myValue As String
Dim myFileAs As String
Dim myAnswer As Integer
 
  'get registry key to work with
  myRegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\MailSettings\MarkComments"
  If myRegKey = "" Then Exit Sub
  'check if key exists
  If RegKeyExists(myRegKey) = True Then
    'key exists, read it
    myValue = RegKeyRead(myRegKey)
    If myValue = 1 Then myValue = "0" Else myValue = 1
      Else
    myValue = 1
   End If
 
    If myValue <> "" Then
      RegKeySave myRegKey, myValue
      MsgBox "Registry key set to " & myValue
  End If

End Sub

'reads the value for the registry key i_RegKey
'if the key cannot be found, the return value is ""
Function RegKeyRead(i_RegKey As String) As String
Dim myWS As Object

  On Error Resume Next
  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'read key from registry
  RegKeyRead = myWS.RegRead(i_RegKey)
End Function

'sets the registry key i_RegKey to the
'value i_Value with type i_Type
'if i_Type is omitted, the value will be saved as string
'if i_RegKey wasn't found, a new registry key will be created

' change REG_DWORD to the correct key type
Sub RegKeySave(i_RegKey As String, _
              i_Value As String, _
     Optional i_Type As String = "REG_DWORD")
Dim myWS As Object

  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'write registry key
  myWS.RegWrite i_RegKey, i_Value, i_Type

End Sub

'returns True if the registry key i_RegKey was found
'and False if not
Function RegKeyExists(i_RegKey As String) As Boolean
Dim myWS As Object

  On Error GoTo ErrorHandler
  'access Windows scripting
  Set myWS = CreateObject("WScript.Shell")
  'try to read the registry key
  myWS.RegRead i_RegKey
  'key was found
  RegKeyExists = True
  Exit Function
 
ErrorHandler:
  'key was not found
  RegKeyExists = False
End Function

מקור
זה נראה עובד, אבל יש לך מושג איך אני גורם לקריקטוריון להיות נצרך שבלעדיו האקסס לא יעלה?
 
  • הוסף לסימניות
  • #7
תוסיף אירוע בעת טעינה על הטופס הראשון שאתה פותח, שבודק את הנתון.
אם הוא שונה ממה שבא לך, שהקובץ ייסגר.
 
  • הוסף לסימניות
  • #8
תוסיף אירוע בעת טעינה על הטופס הראשון שאתה פותח, שבודק את הנתון.
אם הוא שונה ממה שבא לך, שהקובץ ייסגר.
הוא מסמן לי שגיאה:
upload_2019-4-1_19-0-10.png
 
  • הוסף לסימניות
  • #9
את הסיסמא אני צריך להזין איפה שכתבתי 12345 או בנתיב של הרגיסטרי?
תודה!
 
  • הוסף לסימניות
  • #10
הכנסת את האירוע בתוך הקוד.
השורה של sub לא צריך להיות.
כנראה גם בסוף יש לך end sub
 
  • הוסף לסימניות
  • #12
יש לי שאלה יש לי טופס ראשי ובתוכות טופס משנה בחלקו התחתון
הייתי רוצה לדעת איך אני שם תיבה משולבת בחלק עליון ולדפדף את הטופס המשנה שבחלקו התחתון
ניתן גם על ידיי לחצן תודה.....
 
  • הוסף לסימניות
  • #13
בס"ד

ע"י תיבת רשימה:
שבה יש את המזהה שעל פיו אתה רוצה לסנן את טופס המשנה, ובמאפיינים של טופס המשנה בחר בקישור שדה אב את המזהה הנ"ל

ע"י לחצן:

אם זה "הבא" או "הקודם" אתה יכול להעביר את המוקד לטופס המשנה (או לפקד שנמצא שם), ולעבור רשומה או קדימה או אחורה, ע"י
DoCmd.GoToRecord , "", acNext
או
DoCmd.GoToRecord , "", acPrevious
כמובן: כל הנ"ל רק אם טופס המשנה הוא טופס יחיד
 

פרוגבוט

תוכן שיווקי
פרסומת

פוסטים חדשים שאולי לא קראת....

הצטרפות לניוזלטר

איזה כיף שהצטרפתם לניוזלטר שלנו!

מעכשיו, תהיו הראשונים לקבל את כל העדכונים, החדשות, ההפתעות בלעדיות, והתכנים הכי חמים שלנו בפרוג!

לוח מודעות

הפרק היומי

הפרק היומי! כל ערב פרק תהילים חדש. הצטרפו אלינו לקריאת תהילים משותפת!


תהילים פרק כה

אלְדָוִד אֵלֶיךָ יי נַפְשִׁי אֶשָּׂא:באֱלֹהַי בְּךָ בָטַחְתִּי אַל אֵבוֹשָׁה אַל יַעַלְצוּ אֹיְבַי לִי:גגַּם כָּל קוֶֹיךָ לֹא יֵבֹשׁוּ יֵבֹשׁוּ הַבּוֹגְדִים רֵיקָם:דדְּרָכֶיךָ יי הוֹדִיעֵנִי אֹרְחוֹתֶיךָ לַמְּדֵנִי:ההַדְרִיכֵנִי בַאֲמִתֶּךָ וְלַמְּדֵנִי כִּי אַתָּה אֱלֹהֵי יִשְׁעִי אוֹתְךָ קִוִּיתִי כָּל הַיּוֹם:וזְכֹר רַחֲמֶיךָ יי וַחֲסָדֶיךָ כִּי מֵעוֹלָם הֵמָּה:זחַטֹּאות נְעוּרַי וּפְשָׁעַי אַל תִּזְכֹּר כְּחַסְדְּךָ זְכָר לִי אַתָּה לְמַעַן טוּבְךָ יי:חטוֹב וְיָשָׁר יי עַל כֵּן יוֹרֶה חַטָּאִים בַּדָּרֶךְ:טיַדְרֵךְ עֲנָוִים בַּמִּשְׁפָּט וִילַמֵּד עֲנָוִים דַּרְכּוֹ:יכָּל אָרְחוֹת יי חֶסֶד וֶאֱמֶת לְנֹצְרֵי בְרִיתוֹ וְעֵדֹתָיו:יאלְמַעַן שִׁמְךָ יי וְסָלַחְתָּ לַעֲוֹנִי כִּי רַב הוּא:יבמִי זֶה הָאִישׁ יְרֵא יי יוֹרֶנּוּ בְּדֶרֶךְ יִבְחָר:יגנַפְשׁוֹ בְּטוֹב תָּלִין וְזַרְעוֹ יִירַשׁ אָרֶץ:ידסוֹד יי לִירֵאָיו וּבְרִיתוֹ לְהוֹדִיעָם:טועֵינַי תָּמִיד אֶל יי כִּי הוּא יוֹצִיא מֵרֶשֶׁת רַגְלָי:טזפְּנֵה אֵלַי וְחָנֵּנִי כִּי יָחִיד וְעָנִי אָנִי:יזצָרוֹת לְבָבִי הִרְחִיבוּ מִמְּצוּקוֹתַי הוֹצִיאֵנִי:יחרְאֵה עָנְיִי וַעֲמָלִי וְשָׂא לְכָל חַטֹּאותָי:יטרְאֵה אוֹיְבַי כִּי רָבּוּ וְשִׂנְאַת חָמָס שְׂנֵאוּנִי:כשָׁמְרָה נַפְשִׁי וְהַצִּילֵנִי אַל אֵבוֹשׁ כִּי חָסִיתִי בָךְ:כאתֹּם וָיֹשֶׁר יִצְּרוּנִי כִּי קִוִּיתִיךָ:כבפְּדֵה אֱלֹהִים אֶת יִשְׂרָאֵל מִכֹּל צָרוֹתָיו:
נקרא  2  פעמים
למעלה