 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 13th, 2007, 06:19 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
__________________
Brendan Bartley
|
|

February 13th, 2007, 01:46 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
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
|
|

February 14th, 2007, 09:59 AM
|
|
Friend of Wrox
|
|
Join Date: Jan 2007
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
mmcdonal,
In what cases should you use an unbound form besides a search form?
|
|

February 14th, 2007, 10:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
mmcdonal
If the form is unbound and you use unbound fields how do you associate the fields to the table
Thanks
Brendan Bartley
|
|

February 15th, 2007, 08:39 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
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
|
|

February 15th, 2007, 12:54 PM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Is "On Current" the event that occurs when the form shows a new record, like when I click the next record navigator control?
|
|

February 15th, 2007, 12:56 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Yes. The Form's On Current event fires when the record changes to a new record.
mmcdonal
|
|

February 15th, 2007, 06:25 PM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, mmcdonal. Do you know of a source of information about events?
|
|

February 16th, 2007, 08:17 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
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
|
|

February 16th, 2007, 11:31 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |