A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Boxes again



 
 
Thread Tools Display Modes
  #1  
Old September 18th, 2004, 08:18 AM
external usenet poster
 
Posts: n/a
Default Combo Boxes again

I have three combo boxes (FirstName, Surname,
PhoneNumber) on a form and a table whose fields are
FirstName, Surname, PhoneNumber and Company.

I want to use any one of these combo boxes to search the
table and fill in the other two combo boxes with the
find. As I fill in a combo box, the combo list must
return only those items closest to the filled in value.
(If a match is not made on the first attempt of the combo
box, then I would use the next combo box to search using
a different value)

How do I achieve this. Thanks for your help.
Clive
  #2  
Old September 18th, 2004, 07:45 PM
rpw
external usenet poster
 
Posts: n/a
Default

Traditional setup is to have cascading combo boxes. e.g. Select a first
name, requery the surname combo, select a surname, requery the phone combo.
If you need help with this, post back.

In my opinion, what you want to do with selecting from ANY combo is not
practical. It MIGHT be possible with a high level of programming, but that's
not in my realm of skills. Access would have to know which combo was
selected first, second, and third so that it could requery properly. Then if
another selection was made, does that mean that the first two selections are
kept, or does the process start over, or is Access supossed to remember only
the previous two selections? With an "ANY" scenario, it would be pretty
difficult to program for all possible situations and anticipate the user's
needs.

" wrote:

I have three combo boxes (FirstName, Surname,
PhoneNumber) on a form and a table whose fields are
FirstName, Surname, PhoneNumber and Company.

I want to use any one of these combo boxes to search the
table and fill in the other two combo boxes with the
find. As I fill in a combo box, the combo list must
return only those items closest to the filled in value.
(If a match is not made on the first attempt of the combo
box, then I would use the next combo box to search using
a different value)

How do I achieve this. Thanks for your help.
Clive

  #3  
Old September 20th, 2004, 09:15 AM
external usenet poster
 
Posts: n/a
Default

...The reason for having the three combo boxes is that I do
not duplicate a record. I need to be sure that the record
selected is the one I want, ie details on a record's
field may be outdated, so I need a mechanism to identify
the changed field. If a field has changed the field and
record needs to be updated or if no match is found a new
record created.
Cascading combo boxes would be an avenue to investigate (
I may need more info on this)
If I choose the any three combo boxes options, would it
mean coding in the AfterUpdate
part of each combo box? Can a control's control source
have multiple entries?
Thanks again. Clive


-----Original Message-----
I have three combo boxes (FirstName, Surname,
PhoneNumber) on a form and a table whose fields are
FirstName, Surname, PhoneNumber and Company.

I want to use any one of these combo boxes to search the
table and fill in the other two combo boxes with the
find. As I fill in a combo box, the combo list must
return only those items closest to the filled in value.
(If a match is not made on the first attempt of the

combo
box, then I would use the next combo box to search

using
a different value)

How do I achieve this. Thanks for your help.
Clive
.

  #4  
Old September 20th, 2004, 04:51 PM
rpw
external usenet poster
 
Posts: n/a
Default

Comments in-line below.....

" wrote:

ie details on a record's
field may be outdated, so I need a mechanism to identify
the changed field. If a field has changed the field and
record needs to be updated or if no match is found a new
record created.

Sorry, I'm not understanding all of that....

Cascading combo boxes would be an avenue to investigate (
I may need more info on this)

It's my suggestion that's how you do it if you're going to use combo boxes.

If I choose the any three combo boxes options, would it
mean coding in the AfterUpdate
part of each combo box?

In both situations, the AfterUpdate event of the combo box requires some
coding. In the 'cascading' version, cboFirstName will fire off an
instruction for cboSurname to requery. The row source for cboSurname is a
query that filters based on the selection made in cboFirstName. Like I said
before, it'd be beyond my skills to write an 'ANY' type of code.

Can a control's control source
have multiple entries?

No.

...The reason for having the three combo boxes is that I do
not duplicate a record. I need to be sure that the record
selected is the one I want,

So, the combination of FirstName, Surname, and PhoneNumber makes the record
unique? If that's the case, then make those three fields combined into the
PK (or alternatively, index the combination).

Or, if you want to get slick, maybe you write code in the form's
BeforeUpdate event that will compare the entries in the FirstName, Surname,
and PhoneNumber fields to check the file for duplicates. If there are no
duplicates, the record is saved. If there is a duplicate, then that record
is pulled up for comparison. (John Smith Jr. and John Smith Sr. might both
work at the same company with the same phone #.)

One of the MVPs here, Albert D. Kallal has a web-site that has lots of tips
on designing an Access app. One of them is where you type letters into a
field and the listbox below starts filtering on those letters. Sorry, I
don't have the link to that particular page, but here's a link to one of the
pages on his site - search through there for some good ideas:

http://www.attcanada.net/~kallal.msn.../ridesrpt.html


Thanks again. Clive


You're welcome ;-)



-----Original Message-----
I have three combo boxes (FirstName, Surname,
PhoneNumber) on a form and a table whose fields are
FirstName, Surname, PhoneNumber and Company.

I want to use any one of these combo boxes to search the
table and fill in the other two combo boxes with the
find. As I fill in a combo box, the combo list must
return only those items closest to the filled in value.
(If a match is not made on the first attempt of the

combo
box, then I would use the next combo box to search

using
a different value)

How do I achieve this. Thanks for your help.
Clive
.


 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuous subforms, combo boxes, and making them dependent David Walker Using Forms 3 July 26th, 2004 08:35 PM
Combo Boxes #1 Tom Using Forms 0 June 9th, 2004 03:50 AM
Cascading Combo Boxes Tom Using Forms 1 June 9th, 2004 02:04 AM
Cascading Combo Boxes -- Part 1 rich Using Forms 0 June 8th, 2004 10:03 PM
Cascading Combo Boxes Tom Using Forms 0 June 8th, 2004 09:24 PM


All times are GMT +1. The time now is 09:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.