p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Combo Box Setup (http://p2p.wrox.com/showthread.php?t=53978)

Brendan Bartley February 13th, 2007 06:19 AM

Combo Box Setup
 
Hi All
I have a combo box (Full Names) on a form that is unbound but is associated with the address fields. Every time the form is open the address fields show the first record details but the combo box is blank.Is there any way to have the address fields blank until the combo box is selected

Brendan Bartley

mmcdonal February 13th, 2007 01:46 PM

Use an unbound form.
I am assuming that "I have a combo box (Full Names) on a form that is unbound..." means the combo box is unbound.

mmcdonal

scandalous February 14th, 2007 09:59 AM

mmcdonal,

In what cases should you use an unbound form besides a search form?


Brendan Bartley February 14th, 2007 10:38 AM

mmcdonal

If the form is unbound and you use unbound fields how do you associate the fields to the table
Thanks

Brendan Bartley

mmcdonal February 15th, 2007 08:39 AM

There is more programming involved. But typically in the case you have here, you leave a default selection, which is usually the first record in the table. If you want to remove that, then you use an unboind form and program all of the functions. It is simpler to leave the first selection, and then tie the combo box to the record selection on the form's On Current event using:

cboComboName = PKFieldNameID

HTH

mmcdonal

donevco February 15th, 2007 12:54 PM

Is "On Current" the event that occurs when the form shows a new record, like when I click the next record navigator control?


mmcdonal February 15th, 2007 12:56 PM

Yes. The Form's On Current event fires when the record changes to a new record.

mmcdonal

donevco February 15th, 2007 06:25 PM

Thanks, mmcdonal. Do you know of a source of information about events?


mmcdonal February 16th, 2007 08:17 AM

Coincidentally, WROX has a book called Access 2003 VBA, soon to be updated with 2007, that discusses all sorts of events.

Most Access books cover Events and when they happen.

I am sure MSDN also has a lot of information about what events are on what objects, and when they fire.

mmcdonal

Brendan Bartley February 16th, 2007 11:31 AM

mmcdonal
I have left the form unbound if the table name is tblsuboffices and the field name is group how do I tie the table and field into the form when the combo box is selected
Thanks

Brendan Bartley


All times are GMT -4. The time now is 06:28 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.