For some sort of reason, which i can't seem to spot, this fail and i get my #Name? error, when i tried to do this, i use pretty much the same code another place in my form, the only difference is the cbo and the names of my txt and alike.
Private Sub cboVarenummer_AfterUpdate()
Dim LSQLVareNavn As String
LSQLVareNavn = "select Varenavn from VARENUMMER where VARENUMMER.Varenummer = '" & cboVarenummer & "'"
txtVarenavn.ControlSource = LSQLVareNavn
End Sub
Can anyone spot my error?
what i wish the code would do is when i Select something in my cboVarenummer, the my txtbox txtVarenavn changes its text to what the sql statement returns?