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

كيف اجعل برنامج تجريبي لفتره محدودة من فورم مخصص لذلك


Gamor

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

السلام عليكم

كيفكم ياشباب , مبروك عليكم شهر رمضان الكريم اعاننا الله واياكم على صيامه وقيامه وجعله الله نهايه لهاذا الوباء العالمي

اساتذتنا عندي سؤال

لدي برنامج مصمم على اكسيس  EN 2016

واكرر شكري وامتناني لكل من ساعدني ومن حال مساعدتي في انشاء برنامجي  .

واريد جعله يعمل لفتره انا احددها ثم يتوقف , ويكون بامكاني اعاده تشغيله

الشي الى دورت عليه ابي جدول مربوط مع نموج بحيث استطيع تغير تاريخ التشغيل وتاريخ ايقاف البرنامج و اختيار النمودج او الجدول او التقرير الدي يتم حذفه بعد انتهاء مده البرنامج من خلال هدا النموذج مع ضهور رساله تحذيريه كما هو متوفر من الاكواد بدون ان ادخل على الاكواد لتغيير التاريخ  (يعني فورم خاص بس لتحكم في مدة تشغيل البرنامج)

 

والمعذره من الجميع ادا كان شرحي لطلب غير وافي لني مستجد في مدرستكم

شكرا لتعاونكم ودعمكم لي بالمساعده المستمره .

 

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

اخي العزيز

اعمل جدول فيه عنصرين

الاول my_date ونوعه تاريخ تدخل فيه التاريخ المحدد لانتهاء البرنامج

الثاني pc_ date ونوعه تاريخ ايضا

في النموذج الذي مصدره الجدول حدث عند التحميل تضع ما يلي

Private Sub Form_Load()
pc_date = Date
If my_date = pc_date Then
MsgBox "انتهت المدة المحددة"
DoCmd.Quit
Else
Me.dd = "باقي من الفترة" & my_date - pc_date & "ايام"
End If
End Sub
وان شاء الله يفيد

Database14.zip

تم تعديل بواسطه احمد الحسيني
  • Like 1
رابط هذا التعليق
شارك

هلا اخي

كفكرة يمكنك جلب التاريخ من النت

هذا الموقع لديه فكرة جلب التاريخ من النت

مثال لجلب التاريخ من الانترنت

 

Function InternetTime(Optional GMTDifference As Integer) As Date

    '-----------------------------------------------------------------------------------
    'This function returns the Greenwich Mean Time retrieved from an internet server.
    'You can use the optional argument GMTDifference in order to add (or subtract)
    'an hour from the GMT time. For Example if you call the function as:
    '=InternetTIme(2) it will return the (local) hour GMT + 2. Note that the
    'GMTDifference variable is an integer number.
   
    'Written by:    Christos Samaras
    'Date:          25/09/2013
    'Last Updated:  10/01/2017
    'e-mail:        xristos.samaras@gmail.com
    'site:          https://myengineeringworld.net/////
    '-------------------------------------------------------------------------------

    'Declaring the necessary variables.
    Dim Request     As Object
    Dim ServerURL   As String
    Dim Results     As String
    Dim NetDate     As String
    Dim NetTime     As Date
    Dim LocalDate   As Date
    Dim LocalTime   As Date
   
    'Check if the time difference is within the accepted range.
    If GMTDifference < -12 Or GMTDifference > 14 Then
        Exit Function
    End If

    'The server address.
    ServerURL = "http://www.timeanddate.com/worldclock/fullscreen.html?n=2"
   
    'Build the XMLHTTP object and check if was created successfully.
    On Error Resume Next
    Set Request = CreateObject("MSXML2.ServerXMLHTTP.6.0")
    If Err.Number <> 0 Then
        Exit Function
    End If
    On Error GoTo 0
   
    'Create the request.
    Request.Open "GET", ServerURL, False, "", ""
   
    'Send the request to the internet server.
    Request.Send
   
    'Based on the status node result, proceed accordingly.
    If Request.ReadyState = 4 Then
       
        'If the request succeed, the following line will return
        'something like this: Mon, 30 Sep 2013 18:33:23 GMT.
        Results = Request.getResponseHeader("date")
       
        'Use the Mid function to get something like: 30 Sep 2013 18:33:23.
        Results = Mid(Results, 6, Len(Results) - 9)
       
        'Use the Left and Right function to distinguish the date and time.
        NetDate = Left(Results, Len(Results) - 9) '30 Sep 2013
        NetTime = Right(Results, 8) '18:33:23
       
        'Convert the date into a valid Excel date 30 Sep 2013 -> 30/9/2013.
        'Required for countries that have some non-Latin characters at their alphabet (Greece, Russia, Serbia etc.).
        LocalDate = ConvertDate(NetDate)

        'Add the hour difference to the retrieved GMT time.
        LocalTime = NetTime + GMTDifference / 24

        'Return the local date and time.
        InternetTime = LocalDate + LocalTime
   
    End If
   
    'Release the XMLHTTP object.
    Set Request = Nothing

End Function
?InternetTime()
4/27/2020 10:57:24 AM 

 بالتوفيق

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

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

مشاركه مع اخوانى واساتذتى الافاضل جزاهم الله خيرا

اطلع على هذه المشاركه لاختنا الغاليه زهره ام عهود جزاها الله خيرا ان شاء الله تفى لحل سؤالك

http://arabteam2000-forum.com/index.php?/topic/82843-كود-لجعل-البرنامج-demo-لفترة/&do=findComment&comment=427294

بالتوفيق اخى

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

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