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

Can you load List Boxes with a selection when you open a form?

P: 54
Hi (Windows XP Pro, MS Access 2003)

I have a form that has quite a number of list boxes on it. The list boxes only have 3 or 4 selections possible...Pass, Fail, Average, Not Applicable. The form is used for recording many tests performed on equipment. At present as the tests are conducted, the user clicks on the relevant selection in each list box, then when done saves the results to a table.

What I would like to know is if it is possible to 'preload' a selection, so that when the form is opened, the results of the previous test will be shown in each list box but instead of in black color (such as they look at present when an item in a list box is selected) they will perhaps be gray or whatever.

This would mean that the user could compare how each test parameter result is now ,with how it was last time around.
Then when they made their selection for the current test this would be indicated as usual and when the new test was saved the correct results would be recorded?

As always any advise or tips appreciated.
Mar 4 '07 #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,754
I'm not aware of any facility like that. You could try associating a TextBox with each option and display the current (or loaded) value in the TextBox.
Alternatively, you could add some code into your OnCurrent event procedure to populate a bunch of Labels with .Captions to match the loaded values. Just a couple of ideas.
Mar 4 '07 #2

P: 54
Thanks NeoPa

I thought it might be tricky, and I dont really have room on the form to do the Label or TextBox thing. There is already a method for reviewing the previous record but on another form, but the guys would like to be able to see all the previous tests without looking at the other review form.

Perhaps I might enlarge the form and add the Labels as you suggest.

Thanks again
Mike
Mar 4 '07 #3

NeoPa
Expert Mod 15k+
P: 31,754
No problem Mike.
I rather preferred the label idea myself too, as there is no need to manage properties to ensure it can be written to when required, and also that the operator can't ever change it.
Remember with Label.Captions though, the .Caption property will not be found in the list when typing in the code. That means you'll have to type in Label.Caption for it to work.
Mar 5 '07 #4

Post your reply

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