R
R
Hi, I'm really stuck here.
I have a data combo called cmbHvem which I link to a recordset RS23 like
this
If RS23.State = adStateOpen Then
cmbHvem.RowSource = Nothing
RS23.Close()
End If
SQL = "SELECT AID,(FNavn + ' ' + ENavn) AS Ans FROM Ansatte WHERE KID = '" &
varKID & "'"
RS23.let_Source(SQL)
RS23.Open()
cmbHvem.RowSource = RS23
cmbHvem.BoundColumn = "AID"
cmbHvem.ListField = "Ans"
To get the employees from the selected contact.
Then I want to set the combo value to one particular employee
I get a value from another query, RS1, and try this
cmbHvem.BoundText = RS1.Fields("AID").Value
This works once, this is part of a code on a "Dialog-form-box", the next
time I open the same dialog, the code is not working.
The value of RS1.Fields("AID").Value is like 115, but the combo is not
changing to record 115.
Helppppp
Ronny
I have a data combo called cmbHvem which I link to a recordset RS23 like
this
If RS23.State = adStateOpen Then
cmbHvem.RowSource = Nothing
RS23.Close()
End If
SQL = "SELECT AID,(FNavn + ' ' + ENavn) AS Ans FROM Ansatte WHERE KID = '" &
varKID & "'"
RS23.let_Source(SQL)
RS23.Open()
cmbHvem.RowSource = RS23
cmbHvem.BoundColumn = "AID"
cmbHvem.ListField = "Ans"
To get the employees from the selected contact.
Then I want to set the combo value to one particular employee
I get a value from another query, RS1, and try this
cmbHvem.BoundText = RS1.Fields("AID").Value
This works once, this is part of a code on a "Dialog-form-box", the next
time I open the same dialog, the code is not working.
The value of RS1.Fields("AID").Value is like 115, but the combo is not
changing to record 115.
Helppppp
Ronny