combo boxes navigation
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training add this page to your favourites/bookmarksBookmark page

view a printable version of this pagePrintable version
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Combo Boxes / Navigation

Combo Boxes / Navigation

The UK's most regular instructor-led training courses.
Training information: access training courses · Access course microsoft training · Microsoft Access Training London
See also · microsoft access training · access vba courses · access database course

resolvedResolved · Urgent Priority · Version 2007

No ranking yet
5 posts
replyReplyTue 30 Jun 2009, 08:44Delegate Darren said...

Darren has attended:
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course

Combo Boxes / Navigation

Dear Sir,
I have recently added a search function to one of my existing databases using a combo box, this simply uses a persons name to search through the existing table (I used the wizard to set this up).

The search box (combo box) is positioned at the top of the form. When I type the persons name into the box and press enter it finds the record perfectly. However, if I use the tab key to move from the combo box to the next field it moves it to the next record. For example:

1) I type Smith in the combo box and the record appears for Mr Smith (record number 340);

2) I use the tab key to move to the next field and it changes to record 341.

Can you tell me how to stop the record changing when I press the tab key please.

Kind regards,

Darren.

Access VBA 2 day course
Version Date Location Places
available
Book Next place rate (£)
Pay by
Card
Pay by
Invoice
2003 Wed 24 + Thu 25 Mar 2010 Southwark 8 Book now £445 £450
2003 Wed 5 + Thu 6 May 2010 Bloomsbury 10 Book now £275 £280
2003 Mon 28 + Tue 29 Jun 2010 Bloomsbury 10 Book now £275 £280
2003 Wed 4 + Thu 5 Aug 2010 Bloomsbury 10 Book now £275 £280
2003 Thu 9 + Fri 10 Sep 2010 Bloomsbury 10 Book now £275 £280
2003 Wed 27 + Thu 28 Oct 2010 Bloomsbury 10 Book now £275 £280
Full Schedule: See all 7 Access VBA course dates.
Bookings currently available until 6th December 2010.

Platinum
755 posts
replyReplyWed 1 Jul 2009, 09:53Trainer Stephen said...

RE: Combo Boxes / Navigation

Hi Darren

Thank your for your question

I have built a simple for and managed to replicate the effect you report. Off hand I can see no reason why it should behave in this manner, but I will explore the issues and try to come up with an answer.
In the meantime I would suggest not using the wizard to set up the combo box, but rather writing the VBA code to do it. In short you need to

Create an after update event for the combo box that

a. Builds an SQL string that selects the person specified in the combo box from the table.
b. Sets the form's control source property to the value of that string

This should then solve the problem, and produce something rather more robust than is provided by the wizard

Regards

Stephen

Tue 7 Jul 2009: Automatically marked as resolved.


Related articles

· Want To Get Started With Macros In Microsoft Access?
· Reasons to Consider Microsoft Access Training
· Getting To The Nitty-gritty Via Microsoft Access
· Microsoft Access and Customer Surveys
· Quick Access Course: Creating a Customer Contact Database in 8 Simple Steps

Please browse our web site to find out more about
access training courses and other Microsoft training courses.

Access tip:

Add current time to a field

Press CTRL+SHIFT+ SEMICOLON

View all Access hints and tips


Rate this page:
2.1/5 (108 votes cast)
Institute of IT Training - Accredited Training Provider ILM
Microsoft Certified Partner
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Association of Computer Trainers verified by visa, mastercard securecard