473,395 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Combo Box - Don't see this in any post - Which way is best?

I think I don't understand combo boxes and forms - and all that I'm
reading is just confusing me more.

I am doing a "favor" for a non-profit organization. They take a phone
call and need to either
1. See the client record OR
2. Add a new record if the cient isn't in the database.

I got this to work if I have a form open just showing the Combo Box
(unbound) to select a client, or choose "Add new". Selecting a client
works with the wizard code - populates the fields on the form. I open
the form Data Entry = No, and I hide all the controls except the combo
box.

If the user chooses "Add new", I close the form, and re-open it with
Data Entry = Yes, and hide the search combo box.

This works. But all I've been reading, maybe that's not a good idea.
If the user could type in the combo box and if the record is found,
choose it, otherwise "add new". This would use the "not in list"
event and (I suppose) open the form in add mode, but perhaps fill in
the name the user already typed?

Is one way better than the other? I thought the hide/show all the
controls and labels and command buttons on the form was a lot of code,
but maybe that's right. It was simple code, just many lines. I'm new to
code and forms, but doing ok so far. Just never been a user, so I am
feeling my way in the dark here.

Thanks - in advance - for the advice -
sara

Sep 30 '06 #1
2 1422
sara wrote:
I think I don't understand combo boxes and forms - and all that I'm
reading is just confusing me more.

I am doing a "favor" for a non-profit organization. They take a phone
call and need to either
1. See the client record OR
2. Add a new record if the cient isn't in the database.

I got this to work if I have a form open just showing the Combo Box
(unbound) to select a client, or choose "Add new". Selecting a client
works with the wizard code - populates the fields on the form. I open
the form Data Entry = No, and I hide all the controls except the combo
box.

If the user chooses "Add new", I close the form, and re-open it with
Data Entry = Yes, and hide the search combo box.

This works. But all I've been reading, maybe that's not a good idea.
If the user could type in the combo box and if the record is found,
choose it, otherwise "add new". This would use the "not in list"
event and (I suppose) open the form in add mode, but perhaps fill in
the name the user already typed?

Is one way better than the other? I thought the hide/show all the
controls and labels and command buttons on the form was a lot of code,
but maybe that's right. It was simple code, just many lines. I'm new to
code and forms, but doing ok so far. Just never been a user, so I am
feeling my way in the dark here.

Thanks - in advance - for the advice -
sara
Won't your navigation buttons work? And AllowAdditions set to True?

In your OnCurrent event, you could enter something like
Me.ComboName = Me.ClientID
Me.ComboName.Requery

Let's say you have a client id field. When it opens, the Combo is then
set to the value of the current record.
Oct 2 '06 #2
The problem I forsee with the combo box alone is what if there are two
people with the name Jane Doe. How will the person know which one to
select, and if they select one of them, how do they know when they go
back to the combobox that that one is now the first or the second if
name was the only thing used for the sort since they could be in a
different order the second time around.

You may want the combo to show the name but then have that as the "like
combobox * " criteria for a subform that shows more information for
everyone and then they can select one of those or decide that this is a
new person. and press a new button. On the subform if they double click
on a field of those selected then open up a form for that person with
all the informatioin.

Ron

Oct 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bob Darlington | last post by:
I am using the following SQL as a RowSource for a combo box on a form. "SELECT LAN, TenantName as , ShopNum as FROM qTenantSelect " The field 'ShopNum' is a text field and has a caption...
10
by: Mike L | last post by:
This is for a Win form. Currently, the first record is shown in the combo box. I want the combo box to be blank and when the user clicks on the down arrow to choose from the list and clicks on...
9
by: Mark | last post by:
I am encountering a problem with the combo box. This only happens when using the datasource property, I create a table with the following values (a, b, c, d). Step 1. Select the "c" value from...
9
by: Kay | last post by:
Hi all, Could you tell me the best way to add a blank item(as first item) in a data binded combo box? Because I think I didn't do it right and it generate an error if the second item(after the...
8
by: Jack | last post by:
Hi, I have a asp page where multiple rows for a client is generated using asp. Some of these are combo boxes and some are text and are coming from a recordset. Now, the following is the code to...
2
by: Scott | last post by:
If I click the "Update" button on my form below, I can retrieve the value of my combo by using code in the FORM RESULTS section below. Therefore, if I choose the "Inside" option in my combo, I...
12
by: Doogie | last post by:
How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself,...
9
by: prakashwadhwani | last post by:
I have an unbound combo box in the form header. I have used an input mask "CCCC" 40 times to limit the max number of characters to 40. When I tab into the combo box & press a character say "K"...
2
by: fredloh | last post by:
i have a table with a yes/no field call "Edited". i have a button that runs code to set the "Edited" field of a selected record to "yes". the code also set the rowsource (using SQL Update and Set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.