اذهب الي المحتوي
أوفيسنا

وحدة نمطية هل تستخدم فى الاكسس


jamal2080

الردود الموصى بها

'Sets the border style as None.
Me.textBoxExt1.BorderStyle = BorderStyle.None
'Sets the border style as FixedSingle.
Me.textBoxExt1.BorderStyle = BorderStyle.FixedSingle
'Sets the border style as Fixed3D.
Me.textBoxExt1.BorderStyle = BorderStyle.Fixed3D
'Sets the border raised inner and outer edges.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.Raised
'Sets the border raised outer edge and no inner edge.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.RaisedOuter
'Sets the border raised inner edge and no outer edge.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.RaisedInner
'Sets the edged border appearance of inner edge and outer edge.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.Etched
'Sets the border with no three-dimensional effects.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.Flat
'Sets the border with sunken inner and outer edges.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.Sunken
'Sets the border with sunken inner and no outer edges.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.SunkenInner
'Sets the border with sunken outer and no inner edges.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.SunkenOuter
'Draws the border outside the specified rectangle, preserving the dimension of the rectangle for drawing.
Me.TextBoxExt3.Border3DStyle = Border3DStyle.Adjust
'Shows the border around the TextBoxExt.
Me.textBoxExt2.BorderSides = Border3DSide.All
'Shows the border on top of the TextBoxExt.
Me.textBoxExt2.BorderSides = Border3DSide.Top
'Shows the border at bottom of the TextBoxExt.
Me.textBoxExt2.BorderSides = Border3DSide.Bottom
'Shows the border on left side of the TextBoxExt.
Me.textBoxExt2.BorderSides = Border3DSide.Left
'Shows the border on right side of the TextBoxExt.
Me.textBoxExt2.BorderSides = Border3DSide.Right
'Sets the border color when BorderStyle is set as FixedSingle.
Me.textBoxExt1.BorderColor = Me.colorPickerButton1.SelectedColor

هذه وحدة نمطية هل تستخدم فى الاكسس 

347595972_3550752521874368_4928082435969000656_n.jpg

رابط هذا التعليق
شارك

وعليكم السلام 🙂

 

ايش رايك انت بنفسك تتأكد من هذه المعلومة 🙂

 

في الواقع الاكسس يحفظ جميع تفاصيل تصاميم النماذج والتقارير وبقية كائنات البرنامج كقيمة نصية ،

وعند النقر على الزر كما في الصورة ادناه ، فسيحول الاكسس معلومات هذا النموذج الى ملف نصي ، وسيفتحه لك :

image.png.7ac6829d0148d136a8eb35bca4bbb61c.png

.

لما يفتح الملف ، ابحث عن كلمة Auto_ID حتى تعرف الجواب على سؤالك ، فالبيانات ستكون عن الحقل الاصفر وبقية اعداداته (طبعا بقية تفاصيل النموذج موجودة في ملف النص) 🙂

 

----------------------------------------------------------------------------------

 

ولتعم الفائدة ويكتمل الموضوع :

 

هذه الاوامر لحفظ جميع كائنات الاكسس الى ملفات نص ، 

و اوامر لقراءة ملفات النص وتحويلها الى كائنات في برنامج لاكسس :


Public Sub ExportDatabaseObjects()
  ' https://access-programmers.co.uk/forums/showthread.php?t=99179
  On Error GoTo Err_ExportDatabaseObjects
    
  Dim db As Database
  Dim td As TableDef
  Dim d As Document
  Dim c As Container
  Dim i As Integer
  Dim sExportLocation As String
  Dim strSql As String
  
  Set db = CurrentDb()
  
  sExportLocation = "C:\YOURLOCATION\"
  
  'For Each td In db.TableDefs 'Tables
  ' If Left(td.Name, 4) <> "MSys" Then
  '   DoCmd.TransferText acExportDelim, , td.Name, sExportLocation & "Table_" & td.Name & ".txt", True
  ' End If
  'Next td
  
  Set c = db.Containers("Forms")
  For Each d In c.Documents
    strSql = "insert into _ApplicationObjectList ( ObjType, ObjName, ObjLocation ) " & _
             "select " & acForm & " as ObjType, '" & d.Name & "' as ObjName, '" & sExportLocation & "Form_" & d.Name & ".txt" & "' as ObjLocation;"
    db.Execute strSql, dbSeeChanges
    Application.SaveAsText acForm, d.Name, sExportLocation & "Form_" & d.Name & ".txt"
  Next d
  
  Set c = db.Containers("Reports")
  For Each d In c.Documents
    strSql = "insert into _ApplicationObjectList ( ObjType, ObjName, ObjLocation ) " & _
             "select " & acReport & " as ObjType, '" & d.Name & "' as ObjName, '" & sExportLocation & "Report_" & d.Name & ".txt" & "' as ObjLocation;"
    db.Execute strSql
    Application.SaveAsText acReport, d.Name, sExportLocation & "Report_" & d.Name & ".txt"
  Next d
  
  Set c = db.Containers("Scripts")
  For Each d In c.Documents
    strSql = "insert into _ApplicationObjectList ( ObjType, ObjName, ObjLocation ) " & _
             "select " & acMacro & " as ObjType, '" & d.Name & "' as ObjName, '" & sExportLocation & "Macro_" & d.Name & ".txt" & "' as ObjLocation;"
    db.Execute strSql
    Application.SaveAsText acMacro, d.Name, sExportLocation & "Macro_" & d.Name & ".txt"
  Next d
  
  Set c = db.Containers("Modules")
  For Each d In c.Documents
    strSql = "insert into _ApplicationObjectList ( ObjType, ObjName, ObjLocation ) " & _
             "select " & acModule & " as ObjType, '" & d.Name & "' as ObjName, '" & sExportLocation & "Module_" & d.Name & ".txt" & "' as ObjLocation;"
    db.Execute strSql
    Application.SaveAsText acModule, d.Name, sExportLocation & "Module_" & d.Name & ".txt"
  Next d
  
  For i = 0 To db.QueryDefs.count - 1
    strSql = "insert into _ApplicationObjectList ( ObjType, ObjName, ObjLocation ) " & _
             "select " & acQuery & " as ObjType, '" & db.QueryDefs(i).Name & "' as ObjName, '" & sExportLocation & "Query_" & db.QueryDefs(i).Name & ".txt" & "' as ObjLocation;"
    db.Execute strSql
    Application.SaveAsText acQuery, db.QueryDefs(i).Name, sExportLocation & "Query_" & db.QueryDefs(i).Name & ".txt"
  Next i
  
  Set db = Nothing
  Set c = Nothing
  
  MsgBox "All database objects have been exported as a text file to " & sExportLocation, vbInformation
  
Exit_ExportDatabaseObjects:
  Exit Sub
  
Err_ExportDatabaseObjects:
  MsgBox Err.Number & " - " & Err.Description
  Resume Exit_ExportDatabaseObjects
End Sub

-------------------------

Sub RestoreDatabaseObjects()
  Dim strSql As String
  Dim rs As DAO.Recordset
  
  strSql = "select * from _ApplicationObjectList"
  Set rs = CurrentDb.OpenRecordset(strSql)
  
  If Not rs.BOF And Not rs.EOF Then
    rs.MoveFirst
    While (Not rs.EOF)
      Debug.Print rs.Fields("ObjName")
      Application.LoadFromText rs.Fields("ObjType"), rs.Fields("ObjName"), rs.Fields("ObjLocation")
      rs.MoveNext
    Wend
  End If
  rs.Close
  Set rs = Nothing
End Sub
    
    
    
=====================
for the new TableDataMacro

To export:
SaveAsText acTableDataMacro, "TableName", "C:\PathToFile\DataMacro.xml"

To import:
LoadFromText acTableDataMacro, "TableName", "C:\PathToFile\DataMacro.xml"    

 

جعفر

1589.SaveToText.mdb.zip

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information