I have a unbound form for adding.
I have a combo box to select my plane id which works. Next to it I have a test field that I want the planes description what do I do to get the slected plane's description?
DLookup works great. But now how do I enter this data to my unbound text field.
Me.spdrcription doesn't work so how do I refer to this field. Also my field show "#Name? when I open it. Also how do I get the return of my combo box for my dlookup command?
I believe these to be newbie questions but my book doesn't seem to give any examples. I have 6 books coming from my library so I hope one of them will help!!
Private Sub Combo8_AfterUpdate()
txtdescription = DLookup("spdescription", "planes", "planes.id=2")
MsgBox "Dlookup=" & txtdescription
Me.spDescription = txtdescription
I just discovered that I can get my planes description from the combobox select.
MsgBox "Combo=" & Me.Combo8.Column(1)
Me.spDescription = Me.Combo8.Column(1)
The msgbox works fine but the "Me.spDescription = Me.Combo8.Column(1)"
gives me a "You can't assign a value to this object."