-
Posts
1162 -
تاريخ الانضمام
-
تاريخ اخر زياره
-
Days Won
11
نوع المحتوي
المنتدى
مكتبة الموقع
معرض الصور
المدونات
الوسائط المتعددة
كل منشورات العضو Elsayed Bn Gemy
-
سؤال : ظهور اسم اليوم الحالى تلقائيا فى التقارير
Elsayed Bn Gemy replied to ابو جودي's topic in قسم الأكسيس Access
او ممكن تضيف مربع النص اللى عاوز يظهر فيه اليوم وتخلى تنسيقه dddd وتخلى مصدر بياناته هو حقل التاريخ -
سؤال : ظهور اسم اليوم الحالى تلقائيا فى التقارير
Elsayed Bn Gemy replied to ابو جودي's topic in قسم الأكسيس Access
fldDay: Format([fldDate];"dddd") fldDate هو حقل التاريخ fldDay هو الحقل الذي تريد عرض اسم اليوم فيه -
ترقيم تلقائي لحقل في جدول يتغير بتغير الشهر
Elsayed Bn Gemy replied to osama_matafy's topic in قسم الأكسيس Access
اخى راعى الغنم ؟؟ السنة Dim f, k As Date Dim j As String Dim s As Long If DCount("id", "mytable") > 0 Then f = DMax("mydate", "mytable") If Year(MyDate) > Year(f) Then ID = 1 Else j = "Year(MyDate) = " & Year(Me.MyDate) ID = DMax("id", "mytable", j) + 1 End If Else ID = 1 End If -
ترقيم تلقائي لحقل في جدول يتغير بتغير الشهر
Elsayed Bn Gemy replied to osama_matafy's topic in قسم الأكسيس Access
اخى ومعلمى جعفر هذا صحيح ولكن انا اتعامل مع فئة واحدة فى حقل التاريخ وهو رقم الشهر او رقم اليوم لذلك كان الكود بهذا الشكل -
إظهار السعر عند اختيار الصنف (معدل)
Elsayed Bn Gemy replied to ابراهيم20502050's topic in قسم الأكسيس Access
صح اؤيدك وبشدة -
كيف يتم ربط قاعدة SQL بشاشات ونماذج أكسس؟ (معدل)
Elsayed Bn Gemy replied to ابو فتحى's topic in قسم الأكسيس Access
تعديل اخى الكريم فى الوحدة النمطية الاولى الخاصة بانشاء اتصال DSN وانا براجع الموضوع لقيت الوحدتين مثل بعض تماما وهذه هى تصحيح الوحدة النمطية الاولى '//Name : CreateDSNConnection '//Purpose : Create a DSN to link tables to SQL Server '//Parameters '// stServer: Name of SQL Server that you are linking to '// stDatabase: Name of the SQL Server database that you are linking to '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection '// stPassword: SQL Server user password Function CreateDSNConnection(stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String) As Boolean On Error GoTo CreateDSNConnection_Err Dim stConnect As String If Len(stUsername) = 0 Then '//Use trusted authentication if stUsername is not supplied. stConnect = "Description=myDSN" & vbCr & "SERVER=" & stServer & vbCr & "DATABASE=" & stDatabase & vbCr & "Trusted_Connection=Yes" Else stConnect = "Description=myDSN" & vbCr & "SERVER=" & stServer & vbCr & "DATABASE=" & stDatabase & vbCr End If DBEngine.RegisterDatabase "myDSN", "SQL Server", True, stConnect '// Add error checking. CreateDSNConnection = True Exit Function CreateDSNConnection_Err: CreateDSNConnection = False MsgBox "CreateDSNConnection encountered an unexpected error: " & Err.Description End Function ويمكنك مراجعة ذلك من خلال موقع الدعم فى ميكروسوفت https://support.microsoft.com/en-us/kb/892490 -
ترقيم تلقائي لحقل في جدول يتغير بتغير الشهر
Elsayed Bn Gemy replied to osama_matafy's topic in قسم الأكسيس Access
العفو يا اخى الكريم ولكن هل يمكن اختيار ان الموضوع مجاب -
كيف يتم ربط قاعدة SQL بشاشات ونماذج أكسس؟ (معدل)
Elsayed Bn Gemy replied to ابو فتحى's topic in قسم الأكسيس Access
الحل الثانى وهو ربط القاعدة مباشرة بالجدوال الموجودة على قاعدة SQL عن طريق الوحدة النمطية دى '//Name : AttachDSNLessTable '//Purpose : Create a linked table to SQL Server without using a DSN '//Parameters '// stLocalTableName: Name of the table that you are creating in the current database '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database '// stServer: Name of the SQL Server that you are linking to '// stDatabase: Name of the SQL Server database that you are linking to '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection '// stPassword: SQL Server user password Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String) On Error GoTo AttachDSNLessTable_Err Dim td As TableDef Dim stConnect As String For Each td In CurrentDb.TableDefs If td.Name = stLocalTableName Then CurrentDb.TableDefs.Delete stLocalTableName End If Next If Len(stUsername) = 0 Then '//Use trusted authentication if stUsername is not supplied. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes" Else '//WARNING: This will save the username and the password with the linked table information. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword End If Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append td AttachDSNLessTable = True Exit Function AttachDSNLessTable_Err: AttachDSNLessTable = False MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description End Function وفى حدث عند الفتح للنموذج Private Sub Form_Open(Cancel As Integer) If AttachDSNLessTable("authors", "authors", "(local)", "pubs", "", "") Then '// All is okay. Else '// Not okay. End If End Sub وشكر الله لك -
كيف يتم ربط قاعدة SQL بشاشات ونماذج أكسس؟ (معدل)
Elsayed Bn Gemy replied to ابو فتحى's topic in قسم الأكسيس Access
اخى الكريم بالنسبة لانشاء الاتصال له طريقتين الاولى بالنسبة لموضوع الربط كانت الفكرة انك لو نقلت قاعدة البيانات بتاعتك لاكثر من جهاز هتضر تضيف اتصال DSN لكل جهاز عله قاعدة البيانات علشان تقدر تتصل بالداتابيز اللى على الاستضافة الحل هو انك تنشء اتصال عن طريق وحدة نمطية بدون استخدام معالج البيانات فى الويندوز اولا هتضيف الوحدة النمطية دى بدون التعدل عليها '//Name : AttachDSNLessTable '//Purpose : Create a linked table to SQL Server without using a DSN '//Parameters '// stLocalTableName: Name of the table that you are creating in the current database '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database '// stServer: Name of the SQL Server that you are linking to '// stDatabase: Name of the SQL Server database that you are linking to '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection '// stPassword: SQL Server user password Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String) On Error GoTo AttachDSNLessTable_Err Dim td As TableDef Dim stConnect As String For Each td In CurrentDb.TableDefs If td.Name = stLocalTableName Then CurrentDb.TableDefs.Delete stLocalTableName End If Next If Len(stUsername) = 0 Then '//Use trusted authentication if stUsername is not supplied. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes" Else '//WARNING: This will save the username and the password with the linked table information. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword End If Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append td AttachDSNLessTable = True Exit Function AttachDSNLessTable_Err: AttachDSNLessTable = False MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description End Function وفى حدث عند فتح النموذج ستضيف الكود التالى Private Sub Form_Open(Cancel As Integer) If CreateDSNConnection("(اسم السرفر )", "اسم قاعدة البيانات ", "اسم المستخدم ", "كلمة السر ") Then '// All is okay. Else '// Not okay. End If End Sub ودى اول طريقة -
ترقيم تلقائي لحقل في جدول يتغير بتغير الشهر
Elsayed Bn Gemy replied to osama_matafy's topic in قسم الأكسيس Access
مرحبا استاذ مارد ولو اردنا ان يكون الترقيم لليوم الحالي فكيف يكون عمل ذلك؟؟؟؟؟؟؟؟؟؟؟؟ يكون هكذا اخى الكريم واعزرنى لتاخرى فلم ارى المشاركة ال الان Dim f, k As Date Dim j As String Dim s As Long If DCount("id", "mytable") > 0 Then f = DMax("mydate", "mytable") If Day(MyDate) > Day(f) Then ID = 1 Else j = "Day(MyDate) = " & Day(Me.MyDate) ID = DMax("id", "mytable", j) + 1 End If Else ID = 1 End If -
كيف يتم ربط قاعدة SQL بشاشات ونماذج أكسس؟ (معدل)
Elsayed Bn Gemy replied to ابو فتحى's topic in قسم الأكسيس Access
اخى الكريم هل انت تمتلك قاعدة بيانات sql على استضافة فى سيرفير ما ؟؟ واذا كنت ذلك هل تريد ربط الجداول من خلال النماذج ؟؟ فقط ام تريد ربط الجداول من خلال الاكسس نفسه ؟؟ -
حمد الله على السلامة اخى جعفر ووممكن بقاعدة التجميع Me.TotalByNumbers = DCount("PSelect", "[TblEmployees]", "[PSelect] = true") فى حدث بعد التحديث لمربع الاختيار
-
انا لا اتكلم عن ربط الجداول اخى الكريم . انا اتكلم عن ربط النماذج . الرئيسية بالفرعية حتى تتمكن من اضافة الاصناف
-
تغيير قيمة زر اختيار (check box) عند اغلاق التقرير
Elsayed Bn Gemy replied to الشامي نت's topic in قسم الأكسيس Access
شكرا لك اخى الكريم والله انى مبتدئ مثلك ومن منا يدعى الكمال ؟؟ فالكمال لله وحده والله ما اطلب الا صالح دعائك هذا شكرا لك -
ما انت لازم تربط النموزج الفرعى بالرئيسى عن طريق كود السيارة علشان تقدر تضف لكل سيارة الاصناف بتاعتها
-
طيب مش البرنامج بتاع العهدة شغال مظبوط ؟؟ افتحه فى عرض التصميم وشوف ايه االشغل اللى فيه وطبقه هنا