Avatar billede t-hviid Nybegynder
13. januar 2003 - 14:42 Der er 21 kommentarer og
1 løsning

sende popup meddelse når dato er = eller overskredet

Kan man i Access lave det sådanne at når en dato er = så kommer der en meddelses popup, uden at Access er åben ?
Og ligeledes hvis den er overskredet.
Hvis - hvordan ?
Avatar billede terry Ekspert
13. januar 2003 - 15:06 #1
NOT POSSIBLE
Avatar billede terry Ekspert
13. januar 2003 - 15:07 #2
some how or other Access MUST be running to do this as Access is NOT a database server it is a program which waits until it is told what to do.
Avatar billede henrik13 Nybegynder
13. januar 2003 - 15:25 #3
Du kan ikke få access til at lave noget som helst, uden databasen er opstarted.
Henrik
Avatar billede jkrons Professor
13. januar 2003 - 16:22 #4
Og det gælder vel dybest set et hvilket som helst program. Hvis ikke programmet er startet kan det ikke udføre noget som helst.
Avatar billede t-hviid Nybegynder
14. januar 2003 - 07:41 #5
:-( kan man så lade Access kører i baggrunden på en eller anden måde?
Avatar billede terry Ekspert
14. januar 2003 - 08:46 #6
You MUST have Access running. Then you can set a forms timer event to check if there any dates that are =. But then you have to get Access to be the Active window and this is where the problem starts! If it isnt the Active Window then you will not see the Dialog so all is lost!
Avatar billede mugs Novice
14. januar 2003 - 10:42 #7
Du skal starte din db, så kan du evt. minimere den formular, der skal give dig en MsgBox som POPUP. Sæt f.eks timeren til 1000, og ved timerudløb en hændelsesprocedüre:

If Me.Dato = Date() Then
MsbBox "Bla bla"
End If

Men som andre har sagt: ACCESS SKLA KØRE.
Avatar billede t-hviid Nybegynder
14. januar 2003 - 13:08 #8
Kan en anden mulighed være, at få Access til at lægge en meddelse ind i kalenderen i Outlook. Dette er når db er åben.
Avatar billede terry Ekspert
14. januar 2003 - 19:00 #9
thats not a bad idea :o)
Avatar billede t-hviid Nybegynder
14. januar 2003 - 20:45 #10
Hvordan kan man gøre det? How can I do that - for terry ;-)
Avatar billede terry Ekspert
14. januar 2003 - 22:29 #11
I'll get beck when I find an example.
Avatar billede t-hviid Nybegynder
15. januar 2003 - 07:54 #12
:-)
Avatar billede terry Ekspert
18. januar 2003 - 15:27 #13
You may be able to use this.

Dim outobj As Outlook.Application
  Dim outappt As Outlook.AppointmentItem
  Set outobj = CreateObject("outlook.application")
  Set outappt = outobj.CreateItem(olAppointmentItem)
           
           
            With outappt
              .start = Now()
              .End = DateAdd("nn", 5, Now()) 'add 5 minutes to date+time
              .subject = "THis is a test"
              .body = "This is the body"
              .location = "at home"
              .reminderMinutesbeforestart = 15
              .ReminderSet = True
              .Save
            End With
        ' Release the Outlook object variable.
       
        Set outobj = Nothing
Avatar billede t-hviid Nybegynder
20. januar 2003 - 13:19 #14
Thanx ;-)
I´m not world champion in Access, so could you tell me how to do it.
I have tryed to make a moduler (on danish :-) ) and then make a botton i a formular but it's not working.
/Tommas
Avatar billede terry Ekspert
20. januar 2003 - 16:28 #15
t-hviid>Forgot to tell you that you need a reference to Outlook. In code view you can do this in the Tools+References. Then find Outlook in the list.
This may help some.
Avatar billede t-hviid Nybegynder
21. januar 2003 - 08:12 #16
I still hav some problems with it :-( Do you have an eksample taht could help me?
Avatar billede t-hviid Nybegynder
21. januar 2003 - 08:13 #17
eksample =example :-)
Avatar billede terry Ekspert
22. januar 2003 - 21:24 #18
Tommas>I dont have an example, and I would have to use far too long to get a solution which might be acceptable. I can only suggest that you take a look around on the internet, as I just dont have the time right now, sorry!
Avatar billede t-hviid Nybegynder
23. januar 2003 - 10:48 #19
It's ok Terry ;-). Have you made this your self or have you found it on the net. If it's from the net, I will be glad to know where.
Thanx for your help!

/Tommas
Avatar billede terry Ekspert
23. januar 2003 - 20:07 #20
I cant remember if I made it myslef or found it on the net at some time. It happended to be in among all the little bits and pieces I have.
Here are a couple of links where you may find some help on AUTOMATING OUTLOOK
and lots of other goodies too :o)

http://www.mvps.org/access/modules/index.html
http://members.rogers.com/douglas.j.steele/AccessIndex.html
http://search.support.microsoft.com/search/default.aspx?Catalog=LCID%3D1033%26CDID%3DEN-US-KB%26PRODLISTSRC%3DON&withinResults=&QuerySource=gsfxAdvancedSearch_Query&Product=acc2000&Queryc=Outlook&Query=Outlook&KeywordType=ALL&maxResults=25&Titles=false&numDay



Oh! I just stumbled over this, which may give you the answer you want
http://support.microsoft.com/default.aspx?scid=kb;en-us;209963
Avatar billede t-hviid Nybegynder
12. februar 2003 - 07:31 #21
Så lykkedes det. Med god hjælp fra terry's links - den sidste :-)
Her er hvad det endte med:
Private Sub Kommandoknap23_Click()
        On Error GoTo Kommandoknap23_Err
        ' Save record first to be sure required fields are filled.
        DoCmd.RunCommand acCmdSaveRecord
        ' Exit the procedure if appointment has been added to Outlook.
        If Me!AddedToOutlook = True Then
            MsgBox "Der er indlagt påmindelse i Outlook!"
            Exit Sub
        ' Add a new appointment.
        Else
            Dim outobj As Outlook.Application
            Dim outappt As Outlook.AppointmentItem
            Set outobj = CreateObject("outlook.application")
            Set outappt = outobj.CreateItem(olAppointmentItem)
            With outappt
              .Start = Me!NaesteEftersynsDato & " " & Me!ApptTime
              .Duration = 30
              .Subject = "Tjek paniklys"
              .Body = "Hele huset"
              .ReminderMinutesBeforeStart = 15
              .ReminderSet = True
             

             
              .Save
            End With
        End If
        ' Release the Outlook object variable.
        Set outobj = Nothing
        ' Set the AddedToOutlook flag, save the record, display a message.
        Me!AddedToOutlook = True
        DoCmd.RunCommand acCmdSaveRecord
        MsgBox "Påmindelse indlagt i Outlook"
      Exit Sub
Kommandoknap23_Err:
        MsgBox "Error " & Err.Number & vbCrLf & Err.Description
        Exit Sub
       
      End Sub
Avatar billede terry Ekspert
12. februar 2003 - 20:42 #22
Great to heat you got it working Tommas, and thanks for the points :o)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester