Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #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
Reply With Quote
  #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?

Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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?

Reply With Quote
  #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
Reply With Quote
  #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?

Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:58 AM.


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