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
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.
Super. Danke.
Du hast Recht, kein UFO sondern ein anderes Formular.