Neuigkeiten:

Wenn ihr euch für eine gute Antwort bedanken möchtet, im entsprechenden Posting einfach den Knopf "sag Danke" drücken!

Mobiles Hauptmenü

Msgbox für leeres Datumsfeld

Begonnen von boehnli01, Oktober 09, 2011, 13:49:53

⏪ vorheriges - nächstes ⏩

boehnli01

Hallo zusammen,

In meinem Formular habe ich ein Datumsfeld, das  beim doppelclicken ein UFO aufruft. Falls kein Datum drin ist, möchte ich einen Hinweis.
Habe es mal so probiert, aber hat nicht funtioniert.
Private Sub PROD_Date_DblClick(Cancel As Integer)

If Me.PROD_Date Is Null Then
       MsgBox "No Date selcted", vbCritical
       
        Exit Sub
    End If


DoCmd.OpenForm "ufo_Cap_SO_DETAILS", , , "[PROD_Date]=" & Format(Me![PROD_Date], "\#yyyy-mm-dd\#") & " and Prod_Line ='" & Me!Prod_Line & "'"




Danke und gruss
Cédric

DF6GL

Hallo,,


so:

Private Sub PROD_Date_DblClick(Cancel As Integer)

If IsNull(Me!PROD_Date) Then
       MsgBox "No Date selected", vbCritical
Else
       DoCmd.OpenForm "ufo_Cap_SO_DETAILS", , , "[PROD_Date]=" & Format(Me![PROD_Date], "\#yyyy-mm-dd\#") & " and Prod_Line ='" & Me!Prod_Line & "'"
End If

End Sub




btw: Was Du machst, ist das Öffnen (irgend)eines anderen Formulars.  Das hat mit einem UFO (Unterformular-Steuerelement) nichts zu tun.
Viele Grüße vom Bodensee
Franz, DF6GL

Hilfestellung:  http://www.access-o-mania.de/forum/index.php?topic=6969.msg118738#msg118738

Links und Tipps:
1.   http://v.hdm-stuttgart.de/~riekert/lehre/db-kelz/
1a. http://www.tinohempel.de/info/info/datenbank/normalisierung.htm
1b. https://support.office.com/de-de/article/Grundlagen-des-Datenbankentwurfs-eb2159cf-1e30-401a-8084-bd4f9c9ca1f5#bmterms
2.   http://www.donkarl.com
3.   https://web.archive.org/web/20201201233522/http://www.dbwiki.net/
4.   http://www.access-tutorial.de/
5.   http://www.tty1.net/smart-questions_de.htm
6.   http://access.joposol.com/accept

Last but not least:   < F1 > für Hilfe
;) Learning by doing not by spoon-feed ;)

Tipp: Find and Replace for Access

boehnli01

Super. Danke.
Du hast Recht, kein UFO sondern ein anderes Formular.