I have the following (limited to problem):
2 tables:
software (sw_id (pk), sop_id(fk))
sop(sop_id, sop_name, sop_nr)
In the form (actually a software record):
- a combobox
control source: sop_id in software table
row source: a query that populates the combobox with 0:sop_id 1:sop_name, 2:sop_nr
- a textbox (unbound)
Combobox_AfterUpdate:
- insert chosen value in sop table
- display sop_nr in textbox
Expand|Select|Wrap|Line Numbers
- Me.txt_workedit_sopu_nr = Me.cb_workedit_sopu.Column(2)
If I use Form_Load() and put the code above to fill in the txtbox automatically,
it actually works, but it takes the sop_nr of the first record in the dropdownlist..
And not the sop_nr of the displayed one!
I could bind the textbox and use as control source sop_id. But this displays
the sop_id. I did this with the combobox and it works fine: it displays the name.
Form_Open(Cancel As Integer) doesn't change a thing neither (some said to use that).
So, how to display the sop_nr in the textbox on Form_Load?