sorry, zwei Flüchtigkeitsfehler:
Hallo,
ok danke nochmal…versuche es gleich wieder
habe mir nun auch so einen VBA-Code geschrieben(mehr aus Vorlagen abgeschrieben und angepasst)
weil is doch ziemlich schwer!:
kann mir jemand sagen wie ich da noch ein Bild einbinde das dann mitaktualisiert wird sobal die erste Abfrage gemacht wird?
Option Compare Database
Option Explicit
Private Sub Typ_Enter()
On Error Resume Next
If IsNull(Me!Gruppe) Then
MsgBox „Vorher Gruppe auswählen!“, vbExclamation
Me!Gruppe.SetFocus
End If
End Sub
Private Sub Gruppe_AfterUpdate()
If Not IsNull(Me!Gruppe) Then
Me!Typ.RowSource = _
„SELECT DISTINCTROW TypID, Bezeichnung FROM tbl_Typ“ & _
IIf(Me!Gruppe = 0, IIf(Me!Widerstand = 0, „“, _
" WHERE WiderstandsID = " & Me!Widerstand), _
" WHERE GruppeID = " & Me!Gruppe) & " ORDER BY Bezeichnung"
Else
Me!Typ.RowSource = „“
End If
Me!Widerstand.Requery
Me!Typ.Requery
Me!TypID = Null
Me!Bezeichnung = Null
End Sub
Private Sub Gruppe_Enter()
If IsNull(Me!Widerstand) Then
MsgBox „Vorher Produkt auswählen!“, vbExclamation
Me!Widerstand.SetFocus
End If
End Sub
Private Sub Widerstand_AfterUpdate()
If Not IsNull(Me!Widerstand) Then
Me!Gruppe.RowSource = _
„SELECT DISTINCTROW GruppeID, Gruppe FROM tbl_Gruppe“ & _
IIf(Me!Widerstand = 0, „“, " WHERE WiderstandsID = 0 OR WiderstandsID = " & Me!Widerstand) & " ORDER BY Gruppe"
Me!Typ.RowSource = „“
Else
Me!Typ.RowSource = „“
Me!Gruppe.RowSource = „“
End If
Me!Gruppe.Requery
Me!Typ.Requery
Me!TypID = Null
Me!Bezeichnung = Null
End Sub