By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

Form_Load() textbox content behaviour

P: 53
Hi,

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
  1. Me.txt_workedit_sopu_nr = Me.cb_workedit_sopu.Column(2)
This is working fine.

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?
Aug 6 '09 #1
Share this Question
Share on Google+
2 Replies


P: 53
Well, tried it again and seems it works now...
So, following question:

how the $#!% is it possible that things don't work, then suddenly work???
And yes, I saved before etc..
Aug 6 '09 #2

P: 53
Moderator, please trash this topic. Thanks;
Aug 6 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.