silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
I am again a bit stuck and not really be able to work it out on my own.
I marked above where the issue is and I am not able to work it aout..
The combobox returnes the value what I select in the combobox but the strSQLWHERE is not able to update... It is most likely again a small thing but for me a big one
Hope someone could help??
Many thanks
Albert
I am again a bit stuck and not really be able to work it out on my own.
Code:
Private Sub Form_Load()
Dim strSQL As String
Dim strSQLSelect As String
Dim strSQLWHERE As String
'Combobox Aktualisieren
With Me!cboObjStatus
.AddItem "(Alle)"
.AddItem "Aktiv"
.AddItem "Inaktiv"
End With
'Standartwerte Setzen
Me!cboOrtAuswahl = Me.cboOrtAuswahl.ItemData(0)
Me!cboObjStatus = Me!cboObjStatus.ItemData(1)
'Basisabfrage(SELECT TEIL)
strSQL = "SELECT tblObjekte.objID, tblObjekte.objAdresse, tblObjekte.objOrt, IIf([kunFirma] Is Null,[kunVorname] & "" "" & [kunNachname],[kunFirma]) AS Kontakt, tblObjekte.objAktiv " & _
"FROM tblKunden INNER JOIN tblObjekte ON tblKunden.kunID = tblObjekte.objkunIDREF " & _
"ORDER BY tblObjekte.objID;"
'Erstes Kombinationsfeld auswerten
If IsNull(Me!cboOrtAuswahl) Then
MsgBox "Nothing selected"
Else
MsgBox "Es wurde " & Me!cboOrtAuswahl.Value & " ausgewählt"
[COLOR=#ff0000]'here I am nor sure how to get the cboOrtAuswahl to filter my SQL Statement ....objOrt is a field [/COLOR]
strSQLWHERE = "objOrt =" & Me!cboOrtAuswahl
End If
'SELECT TEIL zu strSQL Hinzufügen
strSQL = strSQLSelect
Me!lstObjekte.RowSource = strSQL
Me!lstObjekte.Requery
End Sub
I marked above where the issue is and I am not able to work it aout..
The combobox returnes the value what I select in the combobox but the strSQLWHERE is not able to update... It is most likely again a small thing but for me a big one
Hope someone could help??
Many thanks
Albert