Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old February 13th, 2007, 06:19 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
  #2 (permalink)  
Old February 13th, 2007, 01:46 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
  #3 (permalink)  
Old February 14th, 2007, 09:59 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: , , .
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to scandalous Send a message via MSN to scandalous
Default

mmcdonal,

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

  #4 (permalink)  
Old February 14th, 2007, 10:38 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mmcdonal

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

Brendan Bartley
  #5 (permalink)  
Old February 15th, 2007, 08:39 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
  #6 (permalink)  
Old February 15th, 2007, 12:54 PM
Authorized User
 
Join Date: Nov 2006
Location: Evergreen, CO, USA.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #7 (permalink)  
Old February 15th, 2007, 12:56 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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

mmcdonal
  #8 (permalink)  
Old February 15th, 2007, 06:25 PM
Authorized User
 
Join Date: Nov 2006
Location: Evergreen, CO, USA.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #9 (permalink)  
Old February 16th, 2007, 08:17 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
  #10 (permalink)  
Old February 16th, 2007, 11:31 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a text box from a combo box value dnf999 Access VBA 7 February 6th, 2012 02:24 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





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