By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.